WhatsApp AI auto-reply on your own number with n8n
Published
You can set up a WhatsApp AI auto-reply on your own number: WbizTool posts each new message to n8n as signed JSON, an AI model such as ChatGPT or Claude drafts a reply, and the WbizTool node sends it from the same number. This post builds that workflow, with the filters and limits that keep it safe.
Who it's for and what you need#
It suits a business that wants answers beyond a fixed FAQ, such as looking up an order, or wants to use its own AI account and prompt. You need:
- A paid or lifetime WbizTool plan. Lite is $25 a month in the US.
- The Unibox add-on for each number that should answer: $20 a month or $200 a year per number in the US, added by an Owner on Billing & plans. It lets you add the number to the Unibox inbox, where you can give it a webhook URL.
- A connected WhatsApp number, either:
- linked with a QR code or pairing code: answers around the clock; or
- connected through the free Chrome extension (1.2.0 or later): your WhatsApp login stays in your browser, but it receives and replies only while that Chrome is open with WhatsApp Web logged in.
- n8n with the WbizTool community node (
n8n-nodes-wbiztool) and a WbizTool API credential (your Client ID and API key from Settings → API keys; see Create the credential), and an AI account such as OpenAI or Anthropic.
This workflow answers by itself, around the clock. If you'd rather go through your inbox with Claude or ChatGPT and answer chats while you watch, that works on the same Unibox numbers through WbizTool's MCP server, each reply shown to you as a preview first; it acts only when you ask it. See Work with your inbox.
How it works#
- A customer writes to your number.
- WbizTool picks up the new message (for a number linked by QR code or pairing code, WbizTool checks for new messages about once a minute; for a browser-extension number, the extension forwards them while Chrome is open) and posts it to your webhook URL as JSON, signed with the number's secret.
- n8n's own Webhook node receives it (the WbizTool n8n package has no trigger node).
- n8n checks the signature, then filters out what the AI shouldn't answer.
- An AI step drafts a reply from your business details.
- The WbizTool node (Message → Send) sends it from the same number.
Step 1: Point the number's webhook at n8n#
In n8n, add a Webhook node with the POST method and copy its production URL. Set it to respond immediately, not after the workflow finishes: WbizTool waits 8 seconds for a 2xx answer and retries after a timeout, and an AI step can take longer than that. A retry would mean a second, duplicate reply.
In WbizTool, open Inbox numbers under Inbox, click Add number to inbox, pick the number, paste the n8n URL under Webhook URL (optional) and click Add number. On a browser-extension number, the extension asks for your OK in that browser before it receives anything, and group chats, messages sent from the phone and attachments stay off until you turn on their switches under Browser extension inbox on the number's card. Under Messages to post, keep only Received messages ticked unless you want n8n to see your team's replies. With Sent messages ticked, replies sent from the phone, WhatsApp Web and the API, your AI's own answers included, are posted as message_sent; replies from the Unibox inbox usually aren't. Copy the secret from Your webhook secret. The webhook guide covers every setting.
Step 2: Verify the signature#
Every request carries an X-Wbiztool-Signature header: sha256= and an HMAC-SHA256 of the raw request body with your secret. Check it first, or anyone who finds your n8n URL can make your number send messages.
In the Webhook node's options, turn on Raw Body so n8n keeps the bytes exactly as they arrived. Then, in a Code node, compute an HMAC-SHA256 of those raw bytes with your secret, compare it with X-Wbiztool-Signature using a constant-time comparison, and stop the workflow when they don't match. When it matches, have the Code node return the parsed body (JSON.parse of the raw bytes) as its output item, so the next nodes see event, contact and message directly. Never parse and re-encode the JSON first: the signature won't match. Also reject a body whose timestamp is more than 5 minutes old.
Verify the signature has the exact Node.js check and an openssl and curl test you can post to your n8n URL. Whether a Code node can use the crypto module, environment variables and binary data depends on your n8n version and on Cloud or self-hosted, so check n8n's Code node docs for yours.
Step 3: Filter what the AI answers#
The body tells you who wrote and what they wrote. Add an IF or Filter node that continues only when all of these hold:
| Check | Field | Why |
|---|---|---|
| It's a received message | event is message_received | Never answer your own messages. |
| Not a group | contact.is_group is false | A bot in a group chat annoys everyone. |
| Text only | message.type is chat | For photos and files, message.content is only a label such as 📸 Image. |
| Not a catch-up | replayed is false | Messages more than 10 minutes old arrive after a reconnect; answering them late looks odd. |
| A WhatsApp chat | platform is whatsapp | Telegram contacts may have an @username or tg:<id> instead of a phone. |
| A number to reply to | contact.phone_hidden is false (and contact.phone isn't empty) | It's empty when WhatsApp hides the number. |
| Not a stop word | trimmed message.content isn't STOP, Unsubscribe and the like | Someone asking you to stop shouldn't get an AI reply. |
| Not seen before | message.id not already handled for this whatsapp_client_id | Requests can, rarely, arrive twice. Needs stored state, such as an n8n data table. |
Two more are up to your business:
- Only new conversations. The payload has no "first message" flag. To answer only people writing for the first time, keep your own list in n8n (a data table or a sheet) keyed by
whatsapp_client_idandcontact.phone. - Business hours.
message.timestampis in UTC; convert it to your time zone first.
Step 4: Draft the reply with AI#
Use an OpenAI or Anthropic node for a single answer, or n8n's AI Agent node if the AI should call tools, such as looking up an order in your store. Give it:
- Business context in the system prompt: what you sell, opening hours, delivery areas, your website, and the questions you answer most.
- The customer's message (
message.content) and name (contact.name). - Rules: answer in the customer's language, keep it short, never invent prices, discounts, refunds or delivery dates, and when unsure, reply with a fixed word such as
HANDOFFinstead of an answer.
The WbizTool node takes up to 3,000 characters; ask for a few sentences.
Step 5: Reply from the same number#
Add a WbizTool node with your WbizTool API credential and set:
- Resource: Message, Operation: Send
- Send To: Phone Number
- Phone Number:
{{ $('Filter').item.json.contact.phone }}. After the AI node,$jsonis the AI's output, so map from your filter node, using its own name in place ofFilter. The number already includes the country code, without+. - Country Code: leave it empty.
- Message Type: Text
- Message Text: the AI's answer.
- WhatsApp Client ID:
{{ Number($('Filter').item.json.whatsapp_client_id) }}, so the reply goes out from the number the customer wrote to. - Options → Expire After (Seconds): for example
1800, so a reply held by the hourly limit, a warm-up or a closed browser is dropped instead of reaching the customer an hour later.
The node returns a messageId and the message Created. WbizTool then sends it from your number, and Sent in Reports is the last status you'll see. The n8n integration docs list every field.
Guardrails before you switch it on#
- Hand off to a person. When the AI answers
HANDOFF, send nothing to the customer; alert your team instead (an email, a Slack message, a note in your CRM) and stay quiet in that chat for at least 30 minutes. n8n can't reliably see your team's replies, so use a quiet period rather than counting on detection. - No promises. Prices, refunds, discounts and delivery dates go to a person unless they're in your business context word for word.
- Your workflow's limits. WbizTool's own auto-replies send at most one reply to a contact every 5 minutes and at most 30 an hour from one number, and drop a reply that's more than 30 minutes late. Build the same limits into your workflow; Expire After (Seconds) in Step 5 covers the last one.
- WbizTool's limits for every number. At most 100 messages go out in any 60 minutes: after that, your workflow's replies wait. Inbox replies and auto-replies aren't held, but they count, so a busy inbox leaves less room. At most 1,000 messages per number can be sent or waiting in 24 hours under fair use: one more fails at once with "Daily limit reached". Treat these as a ceiling, not a target.
- Opt-outs. Someone who replies only
STOP(orUnsubscribe,Bajaand similar) to an inbox number is opted out automatically, and nothing is sent to an opted-out number from your workspace, the API included: the message fails with the reason Opted out. "Please stop" in a sentence doesn't count, so add a handoff for it too. The Contacts guide has the details. - Don't double up. With WbizTool auto-replies also on for the number, a customer can get two answers.
- Ban risk. WhatsApp can restrict any number that people block and report, and an AI that chats with strangers raises that risk. WbizTool links your own number the way WhatsApp Web does. It's an independent service, not affiliated with WhatsApp or Meta, and no tool can promise a number will never be restricted. Can my WhatsApp number get banned? explains what triggers it.
Questions people ask#
Does this need the WhatsApp Business API?#
No. WbizTool links the WhatsApp or WhatsApp Business app number you already use, the way WhatsApp Web does. There's no Meta approval and no Meta-approved message templates.
How fast does the AI reply?#
For a number linked by QR code or pairing code, WbizTool checks about once a minute, so the webhook usually arrives within a minute or two; checks pause while the number sends a campaign. A browser-extension number's messages come from its browser while it's open. Add the time your AI takes.
Then the reply itself can wait. For 24 hours after you link a number by QR code or pairing code, and for a number added less than 14 days ago until it has sent 100 messages, every API message from it, your AI's replies included, goes out at least 3 minutes after the one before (WbizTool's own inbox replies and auto-replies aren't slowed; browser-extension numbers have no such warm-up). A number that sent 100 messages in the last 60 minutes holds its API messages until it's under that again. Test on a number linked more than a day ago.
Can the AI answer photos or voice notes?#
Not from the text: for those, message.content is only a label. They carry a media.url (it expires after 3½ to 7 days and is missing for files over 15 MB) that a workflow could pass to a model that reads images or audio, but handing them to a person is simpler.
What if my number is connected through the Chrome extension and the browser is closed?#
Nothing is received or sent until it's open again. Messages people sent meanwhile then arrive, up to 7 days back, marked replayed when they're more than 10 minutes late, so the filter above skips them. If the browser closes before the AI's reply goes out, the reply waits under Waiting to send and is marked Expired 48 hours after it was due, or sooner with Expire After (Seconds). A reply already handed to the browser as it closed is marked failed after 10 minutes. If customers need answers at night, use a number linked by QR code or pairing code for this workflow.
Will it answer old chats when I switch it on?#
No. A number posts only messages that arrive after you add it to the inbox, and filtering on replayed skips late catch-ups.
Try it#
Test with one number and your own phone before customers write. See plans (Lite is $25 a month in the US) and the n8n integration page. To send WhatsApp messages or answer inbox chats from ChatGPT or Claude themselves, see connect WhatsApp to ChatGPT and Claude. For every way to put AI on your numbers (Claude or ChatGPT, an n8n AI agent, Zapier or Make), see Use WbizTool with AI tools.