EspoCRM
With the webhook tools below, your receptionist can recognize callers who are already in EspoCRM and add new callers as leads, with their name, phone number, and what they need, so your team can follow up. EspoCRM’s API takes a static API key and JSON request bodies, so it works the same for EspoCRM Cloud and self-hosted installs.
Before you start
Create a role
In EspoCRM, go to Administration → Roles and create a role that can read and create Leads and read Contacts. Leave every other scope disabled.
Create an API user
Go to Administration → API Users and create a user. Set the authentication method to API Key, and assign the role you just created. Save, then copy the API key from the user’s detail view.
Every tool below sends the key in a request header named X-Api-Key. Set its Type to Secret.
The API key can read and change everything its role allows. Keep the role narrow, and regenerate the key in EspoCRM if it leaks.
Create the tools
For each tool, go to Integrations, select Add integration, choose Webhook Tool, and set Assign to agents to Receptionist. Set Value to Fixed value for every parameter marked “Always” below.
Find a lead
To also recognize existing customers, create a second tool named find_espocrm_contact with the same settings and the URL https://YOUR-CRM.example.com/api/v1/Contact.
Add a new lead
To route new leads to one salesperson, add assignedUserId (string) as a fixed value with that user’s ID. You can see the ID in the address bar when you open the user in EspoCRM.
Select Enable on each tool, then test your receptionist as a new caller who asks for a quote. The lead appears in EspoCRM with the status New and the source Call.
Add a procedure so your receptionist searches first, and only adds a lead when no match is found.
The search also matches names and email addresses, so a caller could try to look up someone else.
Add a rule that your receptionist never reads CRM records back to callers, and keep select
limited to id,name,status.
Limitations
textFilteris the same search as EspoCRM’s own search box: it looks in names, email addresses, and phone numbers. A search by phone number can also match a different record whose number starts with the same digits, so your receptionist should confirm the caller’s name.- Your receptionist can’t add a note or a task to an existing lead or contact with these tools. The new lead’s description holds the call details.
- The tools don’t set teams. EspoCRM takes teams as a list of team IDs (
teamsIds), and a webhook tool always fills a list from the conversation, so it can’t put every lead in the same team, and your receptionist shouldn’t choose teams. UseassignedUserIdto route leads instead.