Fonio

Post-call webhook and variables

When you need a webhook, the three trigger points, how custom variables work per action, and what the route via n8n or Make looks like.

You want to get call data from fonio into your own system (CRM, ticketing system, spreadsheet) or query data from your system during the call. This page explains what the team says about this in onboardings: when the Google Sheets integration replaces the webhook entirely, which three webhook trigger points exist, how custom variables work and what a minimal n8n flow looks like. The exact payload structure is in the developer documentation under HTTP request, not here.

Check first: do you need a webhook at all?

In several onboardings, customers wanted “a webhook for Google Sheets” or had set up a webhook and an HTTP request on the advice of the support chatbot. In every case the native Google Sheets integration in “append” mode was enough; the redundant webhooks were deactivated. If your target is a spreadsheet (waiting list, satisfaction survey, reporting), use the integration.

1

Connect the integration

Under Integrations, select the Google Sheets integration, link the Google account, choose the spreadsheet and sheet.

2

Choose the trigger

“During the call” or “after the call”. Where only certain calls should land in the spreadsheet, “during the call” with a keyword has worked well.

3

Describe the fields

Describe the fields that should go into the spreadsheet in the prompt. Variable names without special characters and without spaces; an “ß” in a name was changed to double S during onboarding to avoid formatting problems.

4

Call the integration in the prompt

Name the integration explicitly in the prompt and define the moment: only once all information has been captured. Without this rule, a practice found cancellations for a different department landing in its waiting list. The fix was a dedicated prompt paragraph that says exactly when the integration is used:

If the caller wants to join the speech therapy waiting list
Then ask for name, phone number and preferred time frame
Then use the integration Waiting list speech therapy once all three details are available
If the caller wants to cancel an appointment
Then do not use the integration, but capture the cancellation for the email summary
5

Separate multiple departments

For several departments (for example physio, occupational therapy, speech therapy), set up the same integration several times and copy the prompt paragraph with adjusted keywords. With separate integrations, the AI assigns data more reliably.

Webhooks: three trigger points

At assistant level, fonio can send data at three points: when the call starts, during the conversation and after the call. This is what the team consistently tells partners and customers.

  • Call start: The inbound webhook is suited to phone number matching, that is, recognising the caller by their number and preloading customer data.
  • During the call: The AI calls your endpoint via HTTP request, waits for the response and carries on talking. Examples from projects: location search, item lookup, stock and price, on-call calendar. fonio handles the session: data is held for the duration of the call, a customer number determined once is cached and passed along with every further request. You do not need to manage a session ID yourself, not even for parallel calls.
  • After the call (post-call): Summary, transcript and further fields go to your system, also via an HTTP request with the trigger “after the call”. By default this includes the call ID, summary and transcript.

One partner described the default scope of their post-call webhook like this (field names schematic; the authoritative structure is in the developer documentation):

{
  "id": "call identifier",
  "summary": "summary of the conversation",
  "transcript": "full transcript"
}

The call logs in the call history show when each webhook fired.

Maintain the execution text

For requests during the call, each request has an execution text field for what the AI says while it waits for the response. Do not leave it empty, and make it long enough, along the lines of: it is checking the database and this will take a moment. In one project an empty or short field led to “one moment please” three times, two seconds of silence and the question whether the caller was still there; in another, the AI bridged the wait with made-up answers.

Custom variables: defined per action

The former “Variable extraction” menu item no longer exists, even if older documentation still mentions it. Variables are now defined per tool call, that is, where they are needed: in the email action, in the SMS, in the integration. Variables marked in red in older assistants come from templates predating the change; delete them and recreate them in the action.

This is how the team creates a variable, using the email action as an example:

1

Write the variable in the content

In the email content, write the variable name in double curly braces, with no spaces in the name:

Customer number: {{CustomerNumber}}
Date of birth: {{DateOfBirth}}
Request: {{Request}}
2

Define the variable

The variable appears below for definition: a description of what it should contain, type (for example number) and format.

3

Make sure the prompt asks for it

Variables are data points for storage, not behavioural logic. Whether and when the AI asks (for example only for existing customers) is controlled by the if-then block in the prompt:

If the caller is an existing customer
Then ask for the customer number and date of birth
If the caller is a new customer
Then ask only for the request and a callback number

Checking variables in the post-call webhook

The easiest way to check whether and under which field name your variables arrive in the post-call payload is a test call against your endpoint (see the n8n flow below) or the developer documentation. The same logic applies to SMS; variables and links can go into an SMS, for example an individual booking link.

n8n or Make as a middle layer

The team regularly points partners with their own backend to n8n or Make. A Freshdesk connection via n8n was confirmed as feasible; for Odoo this was the route before the native integration arrived. Under Integrations there is a dedicated n8n entry; a generic webhook works just the same. The minimal flow as partners describe it:

1

Create the webhook in n8n

Create a webhook node (POST) and copy the URL.

2

Create the request in fonio

Under Integrations, create an HTTP request “after the call” with this URL.

3

Make a test call

Preferably a real call to the number, because the browser test does not deliver all data, for example no caller number. In n8n, look at the incoming body and map the fields from there instead of copying from documentation.

4

Attach the target

Attach the target node (CRM, ticketing system, sheet) and test with a positive and a negative case.

Linking the requests of one call

A partner note from the conversations: piecing together one call from start to finish (inbound webhook, requests during the call, post-call) was “fiddly” but worked in the end. Link the requests via the call identifier that fonio sends along; read the exact field name from the incoming body.

When your system has to deliver the data

For order intake, ERP queries or ticketing systems, fonio builds its own middleware in customer projects. The team prefers clean endpoints on the customer side (authentication, terms, item lookup, quantity, price, stock, final order with dry run). Direct database access is technically possible but considered the less clean solution. The customer sets the direction and payloads, fonio adapts. For authentication on the phone, the team recommends numeric factors plus phone number matching, because alphanumeric codes are only recognised 50 to 60 percent of the time. Costs for such projects are quoted after an effort estimate; as a guide, custom setups with API connection start at €1,000, bespoke technical development more like €2,000 and up.

What the API does not offer today (as of conversations up to September 2026): a configuration API for assistants, an upload for knowledge documents (browser only) and an analytics API. Outbound calls can be triggered via the Outbound API. An MCP server for controlling fonio is enabled on request; a public API is being prepared as an alpha. Ask your partner manager for the current status. For an overview of all systems, see Integrations: what works, what's coming.

If it doesn't work

  • Everything lands in the spreadsheet, including unsuitable calls. Call the integration by name in the prompt, define the moment as “once all information has been captured”, test the “during the call” mode with a keyword. Call through a positive and a negative case.
  • The AI says “one moment” several times or there is silence. Fill in the execution text for each request, reduce the number of requests, check the logs in the call history.
  • The AI says the waiting text twice. The tool’s system message and the AI both speak. A release fixed this; a prompt instruction works as a quick fix. If it keeps happening, report it to support with the conversation link.
  • Red variables in the assistant. Leftovers from old templates; delete them and recreate them in the action.
  • API questions your contact cannot answer. Normal; the team refers specific API questions to support@fonio.ai or the developer contact. Include a short video or the conversation link. More cases under Troubleshooting webhooks.

For partners

Start every customer with the email summary and, if a spreadsheet is enough, with the Google Sheets integration; webhooks and n8n only once the assistant runs stably. If you build a middleware, agree endpoints and payloads with the customer in writing beforehand; that is how the team did it in larger projects, including a read-only start. For payload questions, use the developer documentation and the developer contact, not the support chat.

Further reading