WhatsApp Business Webhook
WhatsApp Business Webhook starts a flow every time your WhatsApp Business number receives a message. It delivers the text, the number and name of the sender and, if the message is an image, document, video or audio, the file as well.
WhatsApp tells NappAI as soon as a message arrives. For that you need to paste your flow’s webhook address into your Meta app, as explained below.
When to use it
- You want an AI assistant that answers your customers’ questions on WhatsApp.
- You want to receive orders or bookings on WhatsApp and record them in your system.
- You want to keep the photos or documents customers send you, for example receipts or invoices.
- You want to alert your team when a customer writes about something urgent.
Configuration
You need a WhatsApp Business credential with the WhatsApp Business API key, your number’s identifier and a verification token you choose (Verification Token). See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | The WhatsApp Business credential of the number that receives the messages. |
| Data | Test field. It lets you try the flow with a sample message without waiting for a real one. Leave it empty in normal use. |
Received text messages are saved in the flow’s conversation history.
Connect WhatsApp to the flow
- Save the flow and publish a version. WhatsApp sends messages to the published version. See Versions and publishing.
- In the editor, click API Access and open the WhatsApp tab. Copy the Webhook URL.
- In your Meta app’s WhatsApp settings, paste that address as the webhook and enter the same Verification Token as in your credential.
- Subscribe in Meta to messages (
messages).
Output
The component has three outputs:
- Data: the message’s details: its ID, the sender’s number, their profile name, the message type (
text,image,document,videooraudio), the date, and the text or file it carries. - Message: the received text as a conversation message, ready to connect to an agent.
- Media: the file the message carries, if any, so you can save or analyse it.
Each number that writes has its own conversation in the flow, so an agent connected to Message remembers what it has discussed with each customer. To reply, connect the answer to Message, which in Basic mode replies to the same number that wrote.
Example
A dental clinic answers questions about opening hours and treatments on WhatsApp.
- Add WhatsApp Business Webhook and choose the clinic’s WhatsApp Business credential.
- Connect the Message output to an agent with the clinic’s information.
- Connect the agent’s answer to Message Body of a Message component with the
Send Messageoperation and Type Operation set toBasic. - Publish the flow, copy the Webhook URL from API Access and paste it into your Meta app.
Good practices
- If you change the credential’s Verification Token, change it in the Meta app as well.
- Test the flow with Data before connecting it to WhatsApp, so you do not answer real customers while you build it.
Related components
- Message: send messages, templates and files with WhatsApp Business.