WhatsApp connector
Connect WhatsApp Business and send messages from AgentRuntime workflows.
En esta página
The whatsapp MCP adapter works with Meta's WhatsApp Cloud API. Send text, photos, voice notes and files, interactive buttons and lists, reactions, and pre-approved templates. Receive customer messages to start workflows or hold a conversation with an agent.
Prerequisites
- A business phone number you can use with WhatsApp Business. For Connect with Meta you do not need your own Meta app, because AgentRuntime is an approved Meta Tech Provider.
- Only for Paste API keys: a Meta developer account and Business app with the WhatsApp product enabled, and a WhatsApp Business Account (WABA) linked to it
- The
project_contributorrole (or higher) in AgentRuntime
Connect in AgentRuntime
AgentRuntime supports two connection paths. Use Connect with Meta: it is the only path that receives incoming messages.
Connect with Meta (recommended)
Most businesses already answer customers from the WhatsApp Business app on a phone. Connect that number and keep using the app: AgentRuntime receives the messages too.
- Open Connections
In the Console, go to Connections and click Add from template.
- Start the signup
On the WhatsApp row, click Connect, open Connect with Meta, and click Connect a number on the WhatsApp Business app. Follow Meta's steps in the popup: you authorize the app, select your business and number, and confirm in the WhatsApp Business app on your phone.
- Complete registration
AgentRuntime stores the access token, WhatsApp Business Account ID, and phone number ID for you. The token is never shown in the browser.
- Install the MCP instance
Go to MCP, click Add connectors, click the whatsapp connector, then Add to workspace. Then wire your WhatsApp connection on Instance config and set the profile active.
Once connected:
- Your replies from the phone show in the conversation. In the Console they appear as WhatsApp Business app. Agents see them in the contact's history as a person's messages.
- The workflow waits while you answer. After you reply from the app, the workflow leaves that contact alone for 30 minutes. Their messages are still kept in the conversation, and the agent sees them when it answers again. When you create the inbound webhook, set the wait under When you reply from the WhatsApp Business app; 0 turns it off.
- Messages sent from some linked devices are not passed to AgentRuntime, and Meta does not offer this in every country. Check Meta's WhatsApp Business app onboarding documentation.
A number without the phone app (advanced)
Under Advanced: a number without the phone app, Connect a number for AgentRuntime only is for a new number that is not on WhatsApp yet, or for moving a number off the WhatsApp Business app. Afterwards the number works only through AgentRuntime: the WhatsApp Business app on your phone stops working for it, and you read and answer in the Console. Install the MCP instance the same way.
Manual credentials (Paste API keys)
If you use your own Meta app and already have a System User token and IDs from Meta Business Manager, you can connect it to send messages.
A connection made with Paste API keys for your own Meta app cannot receive messages: Meta sends incoming messages to your app, not to AgentRuntime. To start workflows from incoming messages or run customer chats, connect the number with Connect with Meta.
- Gather credentials
From Meta Business Settings, collect:
- Access token — System User token with
whatsapp_business_messagingandwhatsapp_business_management - WhatsApp Business Account ID (WABA)
- Phone number ID
- Access token — System User token with
- Enter manually
In Connections, click Add from template, then Connect on the WhatsApp row. Open Paste API keys, fill Access token, WhatsApp Business Account ID, and optionally Phone number ID, then click Save WhatsApp connection.
- Wire MCP instance
Go to MCP, click Add connectors, click the whatsapp connector, then Add to workspace. Then wire the connection on Instance config and set the profile active.
AgentRuntime is an approved Meta Tech Provider, so customers can connect their own WhatsApp Business number with Connect with Meta, without a Meta app of their own.
What you can build
- Order updates — Shopify
get_shopify_order→whatsapp_send_messageorwhatsapp_send_template_messagewhen status changes. - Appointment reminders — Schedule workflow → template message with date/time parameters (24h+ outbound requires approved templates).
- Customer chat — Incoming WhatsApp messages go to an agent in one ongoing conversation session per customer, with hand-off to staff. See WhatsApp customer chat.
- Ops alerts — Workflow failure →
whatsapp_send_messageto on-call number with run summary.
Receive messages
To start workflows from incoming WhatsApp messages, open Workflow setup → Inbound on the workflow and create a subscription with Vendor adapter: WhatsApp and your WhatsApp connection. No webhook URL needs registering with Meta: AgentRuntime routes each message by your business phone number to every workflow subscribed to that connection.
Each message becomes the run's input: {{input.text}}, {{input.from}} (the customer's number), {{input.contact_name}}, {{input.message_id}}, {{input.type}}, and the raw {{input.message}}. Photos, videos, voice notes, documents, and stickers are downloaded when they arrive and stored in your workspace, and the message carries them as {{input.attachments}}; a shared location arrives as {{input.location}}. See Files, voice notes, and locations. Turn on Remember each contact so agent steps see each customer's earlier messages.
For a back-and-forth chat, turn on conversation sessions so a customer's messages share one run instead of starting a run each.
Tools
| Tool | Description |
|---|---|
whatsapp_send_message | Send a text message (to, text; optional preview_url for link previews) |
whatsapp_send_media | Send an image, audio, document, sticker, or video, by public link (media_url) or uploaded media_id, with optional caption and filename |
whatsapp_send_reaction | React to a message with an emoji. Takes to, message_id, and emoji; an empty emoji removes the reaction |
whatsapp_mark_as_read | Mark an incoming message as read (blue ticks), optionally showing a typing indicator with typing_indicator. Also marks earlier messages in the conversation as read |
whatsapp_send_template_message | Send a pre-approved template with header, body, and button parameters |
whatsapp_send_interactive_buttons | Send a message with 1 to 3 reply buttons |
whatsapp_send_interactive_list | Send a message with a list the customer opens to choose from |
whatsapp_send_location | Send a location with name and address |
whatsapp_send_contacts | Send contact cards |
whatsapp_upload_media | Upload media from a public URL for use in messages |
whatsapp_get_media_info | Get details and a download link for uploaded media |
whatsapp_delete_media | Delete uploaded media |
whatsapp_list_phone_numbers | List phone numbers on the WhatsApp Business Account |
whatsapp_get_phone_number | Get details for one phone number |
whatsapp_list_message_templates | List message templates with their components (body text and placeholders), optionally filtered by status |
whatsapp_get_template_status | Get the approval status of a template |
whatsapp_create_message_template, whatsapp_upsert_message_template, whatsapp_delete_message_template | Create, update, or delete templates |
whatsapp_get_business_profile, whatsapp_update_business_profile | Read or update the business profile |
The connector has more administrative tools too, for Flows, QR codes, groups, blocking users, commerce settings, and phone registration. Open the instance on the MCP page to see the full list.
The send tools accept an optional per-call phone_number_id. Otherwise the connector uses the ID from your connection. The interactive, location, and contact tools take the recipient as to_number; the others take to.
WhatsApp only allows free-form messages, media, and interactive messages within 24 hours of the customer's last message to you. Outside that window, use a template.
Example
Send a notification after a workflow step completes:
{
"id": "notify-customer",
"type": "mcp",
"name": "WhatsApp notification",
"instance_id": "YOUR_WHATSAPP_INSTANCE_ID",
"tool_name": "whatsapp_send_message",
"tool_args": {
"to": "{{input.customer_phone}}",
"text": "Your order {{input.order_id}} is ready for pickup."
},
"depends_on": ["validate-order"],
"timeout_s": 30
}For marketing or outbound messages to users who have not messaged you in 24 hours, use whatsapp_send_template_message with an approved template.
Templates
WhatsApp requires pre-approved templates for most outbound business messaging:
- Call
whatsapp_list_message_templatesto find an approved template name and language - Use
whatsapp_send_template_messagewith header, body, and button parameters
While your Meta app is in development mode, add recipient test numbers under WhatsApp → API setup.
People can send a template by hand too: in a conversation session, Send template in the Console uses these two tools to list the approved templates and send the one they pick.
When a customer answers a template, their reply opens a 24-hour window again and arrives like any other message. If a conversation session answers it, turn on Record in the contact's conversation on the template step, so the agent sees the template you sent. See Messages your workflow starts.
Configuration
Stored in your connection / MCP instance profile:
| Key | Required | Description |
|---|---|---|
access_token | Yes | System User or exchanged OAuth token |
business_account_id | Yes | WABA ID |
phone_number_id | Recommended | Default sender phone number |
api_base | No | Meta Graph API base URL (leave empty for the default) |
api_version | No | Meta Graph API version, for example v20.0 (leave empty for the default) |
Troubleshooting
| Issue | Fix |
|---|---|
401 / token errors | Regenerate System User token; update connection |
| Message not delivered (dev mode) | Add recipient as a test number in Meta API setup |
| Template rejected | Use only APPROVED templates from whatsapp_list_message_templates |
| Free-form message not delivered | The customer has not messaged you in the last 24 hours. Send an approved template with whatsapp_send_template_message instead |
| Wrong sender | Pass phone_number_id explicitly or update connection default |
See Troubleshooting for MCP binding and OAuth issues.