top of page
Search

Connect n8n to WhatsApp with AutoResponder — build automations without writing code

  • Writer: Tim Kosmala
    Tim Kosmala
  • Jul 16
  • 7 min read

Let n8n workflows answer your WhatsApp, Instagram, Telegram, Signal and Viber messages — AI replies with your own data, live order status, bookings, payments and more.


Use n8n with AutoResponder for WhatsApp and other messengers

Overview


n8n is a popular workflow automation tool that connects hundreds of apps and AI models with a visual, drag-and-drop editor. You can run it for free on your own server or use n8n Cloud.


AutoResponder's Connect your web server feature is a perfect match for it: every time a rule fires, AutoResponder sends the incoming message to a URL of your choice as an HTTP POST request — and sends back whatever your server returns as the reply. Point that URL at an n8n Webhook node and your chats can trigger any workflow you can imagine. Each of these is just a few nodes away:


🤖 AI that knows your business (RAG)

Connect a vector store (Qdrant, Pinecone, or n8n's built-in one) filled with your price list, FAQ or product docs, and let the AI answer grounded in your own data — "Do you ship to Austria?" gets answered from your actual shipping policy, not a guess.


🛠️ AI agents with tools

An n8n AI Agent node can decide on its own to call other tools mid-conversation: check your calendar, query your database, look up an order — then formulate the answer. The AI doesn't just chat, it does things.


📦 Live order status

Customer sends "Where is my order 1234?" — the workflow extracts the number, looks it up in Shopify, WooCommerce or your database, and replies with the real shipping status and tracking link.


📅 Appointment booking

Check free slots in Google Calendar, offer them in the chat, and book the slot the customer picks — a complete booking dialog inside WhatsApp.


💳 Payment links on demand

"I'll take two" → the workflow creates a Stripe or PayPal payment link for the right amount and sends it back in the same chat.


🌍 Automatic translation

Detect the language of the incoming message, translate it with DeepL or Google Translate, generate the answer, and translate it back. Serve customers in 30 languages with one rule.


🧑‍💻 Human handoff with a silent bot

When someone writes "I want to talk to a human", the workflow alerts you on Slack or Telegram and stores that contact in a data table. As long as the contact is in "handoff mode", the workflow returns an empty replies array — so the bot stays quiet while you take over the conversation, and switches back on when you clear the flag.


🎫 Support tickets from chats

Turn messages into Zendesk, Freshdesk or Jira tickets automatically — including the sender's name and full message — and reply with the ticket number.


📇 Lead capture straight into your CRM

Let AI qualify the message (interest, budget, urgency), then create or update a contact in HubSpot, Pipedrive or Airtable. Your CRM fills itself while you sleep.


📊 Live data from any API

Prices, stock levels, exchange rates, weather, tracking APIs — if it has an HTTP API, n8n's HTTP Request node can fetch it and your rule can answer with it. "BTC?" → current price, seconds later.


🚨 Smart alerts for important messages

Not every message needs a reply — some need you. Let AI classify incoming messages and forward only the urgent ones (complaint, big order, VIP customer) to Slack, email or SMS, while the bot handles the rest.


Most of these exist as ready-made n8n templates you can adapt — search the n8n template library for "webhook" plus your app of choice.


And if you don't want n8n to answer at all, AutoResponder's message output feature can simply notify your workflow whenever a reply was sent — more on that below.


You'll need AutoResponder and an n8n instance (n8n Cloud or self-hosted).


How AutoResponder talks to n8n


When your rule is triggered, AutoResponder sends this JSON to your webhook URL:

{
    "appPackageName": "tkstudio.autoresponderforwa",
    "messengerPackageName": "com.whatsapp",
    "query": {
        "sender": "John Smith",
        "message": "This is an example!",
        "isGroup": false,
        "groupParticipant": "",
        "ruleId": 42,
        "isTestMessage": false
    }
}

Your workflow answers with one or more replies (each is sent as a separate message):

{
    "replies": [
        { "message": "Example reply 1" },
        { "message": "Example reply 2" }
    ]
}

That's the whole protocol. Now let's set it up.


How to set up n8n and AutoResponder


In n8n


  1. Create a new workflow and add a Webhook node as the trigger.

  2. Set HTTP Method to POST.

  3. Set Respond to Using 'Respond to Webhook' Node. This is important — the default "Immediately" setting answers before your workflow has produced a reply, and AutoResponder won't get anything useful.

  4. Build your logic in between. The incoming message is available as {{ $json.body.query.message }} and the sender as {{ $json.body.query.sender }}. For a quick AI bot, drop in an AI Agent or OpenAI node and feed it the message.

  5. Add a Respond to Webhook node at the end. Set Respond With to JSON and return the replies format shown above, e.g.:

    { "replies": [ { "message": "{{ $json.output }}" } ] }

  6. Activate (publish) the workflow using the toggle/button in the top right, and copy the Production URL from the Webhook node. It looks like https://your-instance.app.n8n.cloud/webhook/abc123....


⚠️ Make sure you copy the Production URL, not the Test URL. The Test URL (/webhook-test/...) only works while you press Execute workflow in the n8n editor.


In AutoResponder


  1. Create a new rule or open an existing one.

  2. Set the received message (or use the ⚹ welcome/all-messages options) like in any other rule.

  3. Scroll down and enable Connect your web server.

  4. Paste your n8n Production URL into the URL field.

  5. Optional but recommended: secure the connection (see Tips below).

  6. Save the rule and send yourself a test message — your n8n workflow now answers your chats! 🎉


You can also test without a second phone: use AutoResponder's built-in test chat. Test messages arrive at your workflow with "isTestMessage": true, so you can even handle them differently in n8n.


Trigger workflows when AutoResponder replies (message output)


Maybe you don't want n8n to generate the answer at all — your rules already handle that — but you'd like something to happen whenever AutoResponder replies: archive the conversation, count replies on a dashboard, update your CRM, get a Telegram ping. That's what the message output feature is for, and it works with any rule type (normal replies, AI replies, and so on).


Unlike the web server feature, this one is fire-and-forget: AutoResponder sends the data after the reply went out and doesn't wait for an answer. It never delays or changes your replies.


In n8n


  1. Create a workflow with a Webhook node, HTTP Method POST.

  2. This time, leave Respond on Immediately — AutoResponder doesn't need a response here.

  3. Add whatever should happen: a Google Sheets append, a Telegram message, a database insert…

  4. Activate (publish) the workflow and copy the Production URL.


In AutoResponder


  1. Open Settings → Message output.

  2. Enable Webhook output and paste your n8n Production URL (Basic Auth and custom headers are available here too).

  3. That's the global default for all rules — each rule can override it under its own message output setting (Use global setting / Always log / Never log), so you can log only specific rules if you prefer.


What your workflow receives


{
    "appPackageName": "tkstudio.autoresponderforwa",
    "messengerPackageName": "com.whatsapp",
    "timestamp": 1767105000000,
    "query": {
        "sender": "John Smith",
        "message": "This is an example!",
        "reply": "The reply AutoResponder sent",
        "isGroup": false,
        "groupParticipant": "",
        "ruleId": 42,
        "isTestMessage": false
    }
}

Note the two extra fields compared to the web server request: timestamp (when the message arrived) and reply (what AutoResponder actually sent). Rules that deliberately stay silent (the ### answer) are logged too, with an empty reply — so if your workflow should only run when a reply was really sent, start it with an IF node checking that {{ $json.body.query.reply }} is not empty.


💡 You can use the web server feature and message output together: one workflow generates the answers, another one logs everything that happens.


Tips and Tricks


  • Secure your webhook. In the n8n Webhook node, set Authentication to Basic auth or Header auth. AutoResponder supports both: the rule has Basic Auth username/password fields, and you can add any custom headers (for Header auth, add a header with the same name and secret value you configured in n8n).

  • Reply conditionally. If your workflow returns an empty replies array (or only empty messages), AutoResponder simply doesn't reply. Great for workflows that should only answer sometimes — for example only during business hours or only for certain keywords.

  • Send multiple messages. Each entry in replies is sent as its own message, in order.

  • Use answer replacements. Replies returned by your workflow are processed like normal AutoResponder answers — so replacements like %name% still work inside them.

  • Group chats included. In groups, isGroup is true, sender is the group name and groupParticipant tells you who wrote the message.

  • One workflow, many rules. ruleId tells your workflow which rule triggered it, so a single n8n workflow can serve several rules with a Switch node.


Troubleshooting


  • Toast says No "replies" JSON array (Wrong JSON returned) — your workflow responded, but not with the expected JSON. The most common cause: the Webhook node's Respond option is still on "Immediately" (n8n then answers with its own "Workflow got started" message). Set it to Using 'Respond to Webhook' Node and return the replies JSON there.

  • It works when testing in n8n but not from your phone — you probably saved the Test URL (/webhook-test/...) in the rule. Switch to the Production URL and make sure the workflow is active (published).

  • Toast says AutoResponder webserver error — AutoResponder couldn't reach your URL. Check the URL for typos, make sure your n8n instance is reachable from the internet (HTTPS recommended) and the workflow is active.

  • No reply and no error — check the basics first: the message must arrive as a notification, the rule must match, and AutoResponder needs notification access. Use the in-app test chat to isolate whether the issue is the rule or the workflow.

  • Debugging responses — your workflow can return { "error": "something went wrong" } instead of replies; AutoResponder shows the error text on your phone and sends no reply. Handy while building.

  • Slow replies — the reply is only sent once your workflow finishes, so keep workflows fast. If a workflow takes very long, AutoResponder eventually gives up and no reply is sent — use a faster AI model or move slow steps (like logging) after the Respond to Webhook node so they run after the reply is already out.

bottom of page