AnyLinga
EN
Log in Try it free

Help Center/AI agent

What data your n8n workflow receives from AnyLinga

Updated: 2026-11-13

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.

FieldContents
message_textThe customer's text in their language; for media, a caption or a label such as [Image]; for voice messages, a transcript.
translated_textThe same text in the language used by the account's managers.
message_typetext, image, audio, document, video, or sticker.
media_urlA link to the file or null. For WhatsApp Business API, the link goes through AnyLinga and opens without authentication.
captionThe customer's media caption or null.
conversation_idThe conversation ID in AnyLinga; required to message the customer first.
message_idThe ID of this customer message in AnyLinga; the agent uses it to add a reaction. For a test message, it is null.
channelThe channel the message came from.
contact_idThe contact ID in Kommo or null.
adThe Meta ad the customer sent this message from, or null.
langThe customer's language.
agent_langThe language used by the account's managers.
correlation_idThe ID of this request; you must return it in your response.
callback_urlWhere 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-Signature header.
  • If the values do not match, the request is not from AnyLinga. Do not process it.
The n8n starter template (Download .json) does not verify the signature. You need to add verification to the workflow yourself.

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.

How to connect an AI agent through n8n, which messages are sent to the agent, why the response does not reach the customer, reactions.

Did you find this article helpful?

Get in touch

We reply during business hours.

Already using AnyLinga?

Describe your question and we'll reply on WhatsApp or by email.

New to AnyLinga?

Try it yourself, or we'll set it up for you when you pay for the first month.

Discuss setup

What you need