AnyLinga
EN
Log in Try it free

Help Center/AI agent

Why AI agent replies don't reach the customer

Updated: 2026-11-11

If your workflow returns the AI's text in the webhook response body, the customer won't receive it: AnyLinga doesn't read that body. Send the reply in a separate POST request to callback_url. If you already do this, check the token, request fields, and callback response code.

Accept the request immediately, then send the reply

The n8n webhook must return a 2xx code as soon as it receives the request—within 10 seconds. After your AI finishes processing, the workflow sends the reply in a separate POST request to callback_url.

If the webhook responds only after the AI finishes, the workflow may exceed the 10-second limit. AnyLinga will stop waiting and won't retry the request, but a reply sent later to callback_url with that correlation_id will still reach the customer.

What happens after the webhook request

Retries depend on the outcome of the webhook request. Reaching the 10-second timeout alone doesn't trigger a retry.

Webhook responseWhat AnyLinga does
2xx within 10 secondsThe request is accepted. AnyLinga waits for a reply at callback_url.
No response within 10 secondsNo retry; replies to callback_url are still accepted.
Connection error or 5xxUp to 5 retries with delays of 2, 5, 10, 20, and 30 seconds—about a minute. Subsequent messages in this conversation wait.
4xxNo retry.
Retries may cause the workflow to receive the same message multiple times with the same correlation_id. Only the first reply is sent to the customer; the others receive {"ok": true, "duplicate": true} and aren't sent. A correlation_id doesn't expire: you can send a reply even an hour later.

Check the message path

1. Check that the gateway is enabled and the URL is set

  • Under AI gateway on the Connect your AI page, check Enable gateway and n8n webhook URL. Only HTTPS is allowed.

2. Check the callback URL and authorization

  • Send the reply to callback_url with the Authorization: Bearer <Callback token> header.
  • After you click Regenerate, the old token stops working immediately. Replies will receive 401 until you update the token in n8n.

3. Check the reply body

  • Include the correlation_id from the incoming request and reply_text and/or template_ids.

4. Check the trigger filters

  • If filters are set, only messages from customers with a matching open deal are sent to n8n. Review the deal filters.

5. Check whether the account is blocked

  • Make sure the trial hasn't ended or the account has been paid for. Messages from a blocked account aren't sent to n8n.

6. Test the reply with a real message

  • The Test connection button checks only the webhook response: n8n responded in N ms.
  • A callback reply to a test message will return 404 “Unknown correlation_id”: the test request isn't saved. To test a reply to the customer, send a real message.

What the callback response code means

CodeMeaning
200 — {"ok": true}Accepted and sent.
200 with "duplicate": trueA reply has already been sent for this correlation_id. The duplicate wasn't sent.
400Missing correlation_id, or neither reply_text nor template_ids is provided.
401Invalid token.
404Unknown correlation_id or template.
410The conversation has been deleted.
500 / 502Couldn't deliver to the customer.
The callback limit is 120 requests per minute.

how to connect an AI agent through n8n · which fields the workflow receives · what happens after “Regenerate”

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