Connect WhatsApp to n8n
Use n8n? It's a workflow tool like Zapier that you can run yourself. With Sonar, a WhatsApp message, an opt-in or an opt-out can start an n8n workflow, and a workflow can send a WhatsApp message or template back. You use n8n's own Webhook and HTTP Request nodes, so there's nothing to install.
The short version
- In n8n, add a Webhook node (method POST) and copy its production URL.
- In Sonar, paste that address under Settings > Connected apps > Your own system (webhook), as your main address or under More addresses. Pick the updates to send.
- To send WhatsApp messages from n8n, add an HTTP Request node that posts to Sonar's API with your number's API key.
Before you start
- A Sonar account with a connected WhatsApp number. You need to be an owner or admin to set up webhooks.
- n8n, on n8n Cloud or your own server. Sonar has to reach it from the internet over https.
- Your number's API key, to send from n8n: WhatsApp numbers > your number > Advanced (for developers). Keep it in n8n's credentials, never in a message or a shared sheet.
Start a workflow from WhatsApp
- In n8n, add a Webhook node. Set HTTP Method to POST and Respond to Immediately.
- Copy the Production URL. The Test URL only works while you're testing in the editor.
- Activate the workflow, so the production URL answers.
- In Sonar, go to Settings > Connected apps > Your own system (webhook). Paste the address as your main webhook. If your main one already goes somewhere else, open More addresses, paste it there and hit Add address.
- Tick the updates to send, like Messages people send you or Opt-ins and opt-outs, and save.
- Copy the signing secret and keep it in n8n. Sonar only shows it once. Missed it? For your main address, hit New signing secret and copy the new one. For one under More addresses, hit Remove and add it again.
- Hit Send a test in Sonar, or send your number a WhatsApp message. The update lands in n8n.
Each update is a JSON POST with id, type (for example message.received) and sent_at, plus the update's own fields, like the contact and the message text. The full list is on the developer page.
If n8n doesn't answer, Sonar keeps trying for about 2 days. Settings shows a delivery log.
Send a WhatsApp message from n8n
- In n8n, add an HTTP Request node. Method POST, URL
https://sonar.whats-hub.co.za/v1/send. - Authentication: Generic Credential Type, Header Auth. Name
Authorization, valueBearerfollowed by a space and your API key. - Body: JSON,
{"recipient": "27821234567", "message": "Hi Sam, your room is ready from 14:00."}. Use an expression for the number and text from earlier nodes.
WhatsApp only lets free text reach someone who messaged your number in the last 24 hours. Outside that, send an approved template to https://sonar.whats-hub.co.za/v1/send-template with {"recipient": "...", "template_name": "booking_confirmed", "language_code": "en_US", "body_parameters": ["Sam"]}.
To look someone up first, GET https://sonar.whats-hub.co.za/v1/contacts/find?phone=0821234567 gives you their contact with tags, opt-in and your own fields. Sonar never sends marketing to people who opted out, whatever the workflow asks for.
An example workflow
A new lead from your website gets a WhatsApp welcome, and their answer goes to your sales sheet:
- Webhook (from your website's form) > HTTP Request to
/v1/send-templatewith your welcome template. - In a second workflow, Webhook (from Sonar, Messages people send you) > IF the text contains "yes" > Google Sheets, append a row.
Sonar's flows, AI Agent and Inbox carry on as usual, so n8n only has to handle your own systems and sheets.
Checking updates really come from Sonar
It's optional, but worth doing once your workflow does anything that matters.
Every update has a Sonar-Signature header, t=...,v1=.... v1 is the HMAC-SHA256 of t, a dot and the raw request body, made with your signing secret.
- In n8n, turn on the Webhook node's Raw Body option.
- Make the same HMAC with the Crypto node and compare it with
v1. - Refuse an update whose
tis more than a few minutes old.
Questions
Is there a Sonar node for n8n?
Not yet. n8n's own Webhook and HTTP Request nodes do everything here, with nothing to install. If a Sonar node would help you, tell us and we'll look at publishing one.
Does Sonar charge for using n8n?
No. Updates to n8n and sends from n8n are part of your Sonar plan, and WhatsApp's own charges for templates apply as usual. n8n's pricing is up to n8n: its self-hosted edition is free, and n8n Cloud is paid.
Can I send updates to n8n and another system?
Yes. Settings > Connected apps > Your own system (webhook) takes your main address plus up to 2 more, each with its own updates and signing secret.
More guides
- WhatsApp pricing in South Africa
- POPIA and WhatsApp marketing
- Event invites with one-tap RSVPs
- AI Agent and Copilot: a WhatsApp chatbot in your voice
- Set up your WhatsApp team inbox
- Use Sonar with the WhatsApp Business app
- Disconnect your WhatsApp Business app number
- Import your contacts
- Send your first WhatsApp broadcast in Sonar
- Order and booking updates from your other systems
- Sell on WhatsApp: catalog, orders and payment links
- Which number to use for WhatsApp
- What Meta needs from you before Sonar can send
- Plans and billing in Sonar: what you pay, and to whom
- Connect a client's WhatsApp number
- Two-step sign-in for your Sonar account
- WhatsApp API providers in South Africa, compared
- How WhatsApp flows work
- Automatic replies on WhatsApp: after hours, keywords and menus
- WhatsApp calls and voicemail
- Send WhatsApp calls to 3CX
- WhatsApp message templates: write one and get it approved
- Connect WhatsApp to HubSpot
- What Sonar does that others don't publish
- Click-to-WhatsApp ads: answer every ad lead in time
- Get customers to message you on WhatsApp
- WhatsApp and Zoho CRM: a solar installer's journey, tested
- Answer Facebook Messenger and Instagram messages in Sonar
- Integrations: WhatsApp connected to your other tools
- Developers: API and webhooks
- Switching to Sonar
- WhatsApp marketing that earns B-BBEE points
- WhatsApp RSVPs for events
- WhatsApp calls on your phone system
- Competitions and prize draws
- WhatsApp error 2388386: why can't I add another number?
- WhatsApp error 131047: why wasn't my message delivered?
- Do you need 30 days on WhatsApp before Meta business verification?
- Can I move a WhatsApp number to another Meta business portfolio?
- WhatsApp error 131042: how do I add a payment method?
- Can I use my WhatsApp in Claude or ChatGPT?
- Can I connect Sonar to Zapier, Make or Google Sheets?
- How do I send a WhatsApp broadcast without my number getting blocked?
- How can my team share one WhatsApp number and inbox?
- How do I count clicks on a link in my WhatsApp broadcast?
- How do I add a WhatsApp chat button to my website?
- Which WhatsApp API providers keep message data in South Africa?
- How do I send WhatsApp abandoned cart reminders from my Shopify store?
- Can WhatsApp calls save money on an 0800 number or VoIP line?
- What are South African businesses paying for WhatsApp replies since 1 October 2026?