Skip to content

Make & n8n ​

Make and n8n receive webhooks and talk to thousands of apps. They let you connect Yarla to your CRM, Slack or spreadsheet without writing code. This article contains recipes in two directions: receiving data after the call, and returning customer details before the call.

All recipes use the HTTP request action. The field names are those of the webhook after the call and the inbound webhook.

Make ​

Recipe 1: after the call to Google Sheets ​

  1. In Make, create a new scenario and pick Webhooks → Custom webhook as the first module. Click Add, name the webhook and copy the URL.
  2. In Yarla, go to Assistants → Tasks of your assistant and, on the Actions card, click Add new. Choose HTTP request. Name the action, set When to After the conversation, paste the URL, and leave the Method on POST and the Body template empty. The action saves automatically once it has a name and a valid web address.
  3. In Make, click Run once and call the assistant's number. After the call Make receives the request and shows "Successfully determined"; the data structure is now known.
  4. Add the module Google Sheets → Add a Row. Pick your spreadsheet and sheet and drag the fields into the columns: startTimestamp, personNumber, outcome, summary, conversationLink.
  5. Save the scenario and switch it on. For scheduling, choose Immediately.

From now on every conversation of this assistant appears as a row. The Custom webhook answers "Accepted" straight away, so you never come near the 8-second timeout.

Finished SMS, WhatsApp and webchat conversations come in too. On webchat personNumber can be empty, and on a call from a withheld number the field can be empty or hold something that is not a phone number. To keep phone calls only, add a filter on channel equal to voice.

Redetermine the data structure

If you later add variables under Custom variables to extract in the action, click Detect new values in the webhook module and run another conversation in which those variables get filled. Otherwise Make does not show the new fields in the mapping panel.

Recipe 2: after the call a Slack message ​

Start with a Custom webhook as in recipe 1 and add the module Slack → Create a Message. Pick the channel and compose the text from the fields outcome, personNumber, summary and conversationLink, for example:

text
New conversation (resolved) from +31612345678
Jan de Vries reports a leaking kitchen tap and wants a quote.
View conversation: https://<dashboard-domain>/en/inbox/<conversation-id>

The outcome field is always an English code, such as resolved. To post only certain conversations, add a filter on outcome between the modules, for example only callback_requested.

Recipe 3: after the call a HubSpot contact and ticket ​

  1. After the Custom webhook, add a filter that personNumber must start with +, then add HubSpot CRM → Search for Contacts with the filter phone number equals personNumber. The first filter stops conversations without a usable number, such as a webchat without a number or a call from a withheld number. Those therefore produce no contact and no ticket.
  2. Add a Router. Branch "not found": HubSpot CRM → Create a Contact with personNumber as phone number and contact.name as name (empty when the name is unknown). Branch "found": use the existing contact.
  3. In both branches add HubSpot CRM → Create a Ticket with the first line of summary as subject and summary plus conversationLink as content. Associate the ticket with the contact.

n8n ​

  1. Create a workflow with a Webhook node first. Set HTTP Method to POST and choose a path. Set Respond to Immediately for the webhook after the call, or to Using 'Respond to Webhook' Node for the inbound webhook (see below).
  2. Copy the Test URL, put it in your HTTP request action and click Listen for test event in n8n. Call the assistant; after the call the data appears in the node. n8n only listens for 120 seconds, so keep the test call short. If you run n8n yourself, the URL must be publicly reachable: internal and private addresses are refused.
  3. Add the follow-up nodes, for example Google Sheets → Append row, Slack → Send message or HubSpot → Ticket → Create.
  4. Reference the fields in those nodes with expressions. Directly after the Webhook node the payload sits under body. Custom variables sit directly under their own name in there, here issueType:
text
{{ $json.body.summary }}
{{ $json.body.personNumber }}
{{ $json.body.issueType }}

If you first insert an Edit Fields (Set) node that copies the fields, it becomes {{ $json.summary }}.

  1. Publish the workflow with Publish (in older n8n versions: activate) and replace the Test URL in the action with the Production URL. The Test URL only works while you are listening in the editor.

Returning JSON for the inbound webhook ​

For the inbound webhook, Yarla sends the caller's phone number in personNumber and expects a JSON object back within 3 seconds, preferably flat. Both Make and n8n can do this. For a withheld number personNumber can be empty or hold something that is not a phone number. Treat that as an unknown number and return {}.

In the HTTP request action, set When to Before the call and leave the Body template empty. This request only runs on inbound phone calls, so test it with a real call.

Make ​

  1. Webhooks → Custom webhook as the first module, in a new scenario with a new webhook. That keeps these requests out of your after-the-call scenario.
  2. A lookup module, for example HubSpot CRM → Search for Contacts on personNumber, or Google Sheets → Search Rows in a customer list.
  3. As the last module Webhooks → Webhook response with Status 200, under Custom headers the header Content-Type with value application/json, and as Body JSON into which you insert the fields from the lookup module:
json
{
  "customerName": "Jan de Vries",
  "customerId": "C-1042"
}

If the lookup returns nothing, return {}. Use a router with a filter, or the ifempty() function in the body.

n8n ​

  1. Webhook node with Respond set to Using 'Respond to Webhook' Node.
  2. A lookup node, for example HubSpot → Contact → Search or Google Sheets → Get Row(s) with a filter on the phone column.
  3. A Respond to Webhook node with Respond With set to JSON and under Response Body:
json
{
  "customerName": "{{ $json.properties.firstname }} {{ $json.properties.lastname }}",
  "customerId": "{{ $json.id }}"
}

Enable Always Output Data on the lookup node so the workflow also continues for an unknown number and returns {} or empty fields.

Three seconds

The whole chain must answer within 3 seconds, otherwise the assistant starts without context. Limit yourself to one lookup. If your CRM is too slow, keep a copy of your customer list in a Make Data store or a Google Sheet and look up there.

Zapier ​

For the webhook after the call, Zapier works fine: use Webhooks by Zapier → Catch Hook, paste the URL into the action and build your Zap. For the inbound webhook Zapier is less suitable: a Catch Hook responds immediately with its own acknowledgement and cannot easily return your own JSON within the same request. Use Make, n8n or your own endpoint for that.

Verifying the signature ​

Verifying the X-Yarla-Signature header is optional in Make and n8n; Make's webhook URLs and the paths n8n generates itself are long and not guessable. If you want to anyway, use your webhook secret as the key. You find it under Settings → Connections, on the Webhook secret card, which only an Admin sees.

  • n8n: enable the Raw Body option on the Webhook node and compute the HMAC-SHA256 over t + "." + body in a Code node, as described in Webhooks. The payload then arrives unparsed, so convert it to JSON yourself afterwards. Headers are available under $json.headers['x-yarla-signature'] (lower case).
  • Make: on the Custom webhook, under Advanced settings, enable Get request headers so you can read the header, and JSON pass-through so you get the body as text. Compute the HMAC with the sha256() function and the secret as key, over t, a dot and that text. A Parse JSON module gives you the separate fields back afterwards.

A simpler alternative: under Headers in the HTTP request action, add a custom header with a long random token and check it with a filter in Make (this also needs Get request headers on) or an IF node in n8n.

Yarla Help — the guide to your AI phone assistant.