Push WhatsApp activity straight into Slack. When a new lead, order, or support request comes in on WhatsApp, your team sees it in a Slack channel the moment it happens, without anyone watching the WhatsApp inbox.
Before following this guide, read the External API Request step foundation guide. It covers every field in the step interface so this guide can focus on Slack-specific values.
Unlike the helpdesk guides that read tickets INTO WhatsApp, this one pushes WhatsApp events OUT to Slack. The trigger is a WhatsApp event (new lead, order, keyword); the action posts a message into a Slack channel. Perfect for sales and support teams who live in Slack but get enquiries on WhatsApp.
The most important thing to know about the Slack API: it always returns HTTP status 200, even when the request fails. The real success signal is the ok field in the JSON response. If ok is true, the message posted. If ok is false, read the error field. Always check ok, never the HTTP status.
Slack uses a bot token (starting with xoxb-) to authenticate. This is a one-time setup.
chat:write. To post to public channels without inviting the bot, also add chat:write.public.xoxb-). Treat it like a password.Slack chat.postMessage reference: docs.slack.dev
A Slack bot can only post to a channel it belongs to (unless you added chat:write.public). Add it to your alerts channel and grab the channel ID.
/invite @WA.Expert Alerts and send.You can also copy the channel ID from the channel's URL in the Slack web app. The last segment after the workspace ID, beginning with C, is the channel ID.
In your WA.Expert chatbot or automation flow, after the trigger that should fire the alert (a new lead, an order, a keyword), add an External API Request step:
| Field | Value | Notes |
|---|---|---|
| Select Method | POST | chat.postMessage always uses POST. |
| Request URL | https://slack.com/api/chat.postMessage | Fixed Slack Web API endpoint for posting messages. |
| Authorization | Bearer xoxb-YOUR-BOT-TOKEN | Your Bot User OAuth Token from Step 1, after 'Bearer '. |
| Content-Type | application/json | Required when sending a JSON body. |
| Body channel | C0123456789 | The channel ID from Step 2. Not the channel name. |
| Body text | Your message with {{variables}} | Plain text alert. Pull in WhatsApp variables like customer name, phone, and message. |
Pass the channel ID (C0123456789), not '#whatsapp-leads'. While names sometimes work, IDs are reliable and do not break if the channel is renamed.
A successful Slack response looks like this:
Success:
{
"ok": true,
"channel": "C0123456789",
"ts": "1719223456.123456",
"message": {
"text": "New WhatsApp lead: Priya (+919820000001) ...",
"type": "message",
"bot_id": "B0123ABC"
}
}
Failure (still HTTP 200!):
{
"ok": false,
"error": "not_in_channel"
}
Map: ok (true/false). Branch your flow on ok.
If ok = false, read error for the reason.Add a conditions step after the API call that checks if ok equals true. Slack returns HTTP 200 even for failures, so the ok field is your only reliable success signal. Common errors: not_in_channel (invite the bot), invalid_auth (wrong token), channel_not_found (wrong channel ID).
Plain text works, but a formatted Block Kit message is far more readable for a team scanning a busy channel. Replace the text field with a blocks array:
POST https://slack.com/api/chat.postMessage
Authorization: Bearer xoxb-YOUR-BOT-TOKEN
Content-Type: application/json
Body:
{
"channel": "C0123456789",
"text": "New WhatsApp lead from {{customer_name}}",
"blocks": [
{
"type": "header",
"text": {"type": "plain_text", "text": "🟢 New WhatsApp Lead"}
},
{
"type": "section",
"fields": [
{"type": "mrkdwn", "text": "*Name:*\n{{customer_name}}"},
{"type": "mrkdwn", "text": "*Phone:*\n{{customer_phone}}"}
]
},
{
"type": "section",
"text": {"type": "mrkdwn", "text": "*Message:*\n{{customer_message}}"}
}
]
}
Always keep the top-level "text" field too — it is the
fallback shown in notifications and on older clients.Even when you send blocks, always include a top-level text field. Slack uses it for the notification preview and for accessibility. Without it, the push notification on a teammate's phone will be blank.
Trigger: A new contact messages your WhatsApp number for the
first time (or a chatbot captures their name + enquiry).
Captured variables:
customer_name = "Priya Sharma"
customer_phone = "+919820000001"
customer_message = "Do you ship to Pune?"
External API Request step (POST):
URL: https://slack.com/api/chat.postMessage
Headers:
Authorization: Bearer xoxb-...
Content-Type: application/json
Body:
{{
"channel": "C0123456789",
"text": "🟢 New WhatsApp lead: Priya Sharma (+919820000001)\nDo you ship to Pune?"
}}
Response: {{ "ok": true, "ts": "1719223456.123456" }}
Conditions step: if ok = true → continue
if ok = false → log error / retry
Result in Slack #whatsapp-leads:
🟢 New WhatsApp lead: Priya Sharma (+919820000001)
Do you ship to Pune?
Your sales team sees it instantly and can pick it up,
while the WhatsApp bot keeps the customer engaged.| WhatsApp trigger | Slack alert |
|---|---|
| New lead / first-time enquiry | #sales gets the name, number, and question instantly |
| High-value order placed | #orders is notified so fulfilment starts faster |
| Support keyword (refund, complaint, urgent) | #support is pinged for human escalation |
| Abandoned cart over a threshold | #growth sees it and can follow up |
| Negative feedback / low rating | #cx is alerted to step in |
Each of these is a WhatsApp automation trigger in WA.Expert that ends with a Slack chat.postMessage step. Your team lives in Slack; the enquiries arrive on WhatsApp; the two stay in sync.
| Symptom | Likely cause | Fix |
|---|---|---|
| ok: false, error: not_in_channel | Bot is not a member of the channel | In the channel, type /invite @YourApp. Or add the chat:write.public scope and reinstall. |
| ok: false, error: invalid_auth | Wrong or revoked bot token | Recopy the Bot User OAuth Token (xoxb-) from OAuth and Permissions. Ensure 'Bearer ' prefix. |
| ok: false, error: channel_not_found | Wrong channel ID | Use the channel ID (C...), not the name. Recopy it from channel details. |
| ok: false, error: missing_scope | chat:write not granted | Add chat:write under Bot Token Scopes and reinstall the app to the workspace. |
| ok: false, error: not_allowed_token_type | Using a user token instead of a bot token | Use the Bot User OAuth Token (xoxb-), not a user token (xoxp-). |
| Notification is blank on mobile | Sent blocks without a top-level text field | Always include a top-level text field as the notification fallback, even when sending blocks. |
| 429 rate limited | Posting faster than ~1 msg/sec per channel | Slack allows roughly 1 message per second per channel. Check the Retry-After header and space out posts. |
Free trial, no credit card required. And if you ever get stuck, we are the only platform in India that answers you live on WhatsApp.