What data your n8n workflow receives from AnyLinga
AnyLinga sends your n8n workflow JSON with the customer's message, translation, media data, language, and conversation and contact IDs. The request also includes correlation_id, which you must return in your response, and callback_url—the URL to send your response to.
How the request arrives and what it contains
AnyLinga sends a POST request to your n8n webhook URL.
Request headers: Content-Type: application/json and X-AnyLinga-Signature.
Clicking Test connection sends a test message with the text AnyLinga Connect test, channel: test, and an additional field, test: true.
| Field | Contents |
|---|---|
message_text | The customer's text in their language; for media, a caption or a label such as [Image]; for voice messages, a transcript. |
translated_text | The same text in the language used by the account's managers. |
message_type | text, image, audio, document, video, or sticker. |
media_url | A link to the file or null. For WhatsApp Business API, the link goes through AnyLinga and opens without authentication. |
caption | The customer's media caption or null. |
conversation_id | The conversation ID in AnyLinga; required to message the customer first. |
message_id | The ID of this customer message in AnyLinga; the agent uses it to add a reaction. For a test message, it is null. |
channel | The channel the message came from. |
contact_id | The contact ID in Kommo or null. |
ad | The Meta ad the customer sent this message from, or null. |
lang | The customer's language. |
agent_lang | The language used by the account's managers. |
correlation_id | The ID of this request; you must return it in your response. |
callback_url | Where to send the response. |
JSON example
This is a request with a customer's text message in Spanish and an English translation.
{
"message_text": "Hola, ¿tienen envío a Lima?",
"translated_text": "Hi, do you deliver to Lima?",
"message_type": "text",
"media_url": null,
"caption": null,
"conversation_id": "3f6c2a1e-8b4d-4c7a-9e21-5d0b7a9c4f12",
"message_id": "6a1f3c2e-9b7d-4e5a-8c21-0d4b7e9f2a13",
"channel": "wa_business",
"contact_id": 12329727,
"ad": null,
"lang": "es",
"agent_lang": "en",
"correlation_id": "b1e7d0c4-2f3a-4e8b-9c6d-7a5f1e2d3c4b",
"callback_url": "https://app.anylinga.com/api/connect/callback"
}
How to verify the request signature
1. Get the signing secret
- On the Connect your AI page, get the value of the Signing secret (X-AnyLinga-Signature) field.
2. Calculate the request body signature
- Calculate the HMAC-SHA256 of the raw request body exactly as received, using the secret as the key.
- Encode the result as hex to compare it with
X-AnyLinga-Signature.
3. Compare the signature with the header
- Compare the calculated value with the value of the
X-AnyLinga-Signatureheader. - If the values do not match, the request is not from AnyLinga. Do not process it.
Why the request does not include a lead
The request does not include a lead—only contact_id, the contact ID in Kommo, or null. If your workflow needs a lead, you need to find it by contact through the Kommo API.
Related questions
How to connect an AI agent through n8n, which messages are sent to the agent, why the response does not reach the customer, reactions.
Get in touch
We reply during business hours.
New to AnyLinga?
Try it yourself, or we'll set it up for you when you pay for the first month.