Skip to content

The moment it happens

Get alerted when a WhatsApp message fails

You hear about each failed delivery with the recipient and Meta's error, so you can follow up another way.

Runs
The moment it happens
Apps
WhatsApp Business
AI
Not needed
Access
whatsapp_business_messaging

Send this to your assistant

Create a ClickRuntime automation: post to #support in Slack whenever a WhatsApp message we send fails to deliver, with the recipient's number and the error reason.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A clinic sends appointment reminders, a shop sends shipping updates, and a few of them never arrive. The sender sees nothing wrong: the API accepted the message. WhatsApp tries to deliver it later and fails, perhaps because the recipient is not on WhatsApp, has blocked the number, or the template was rejected. Without a signal, the customer misses the appointment and the business wonders why the no-show rate went up.

WhatsApp Business sends a status event for each message. When the status is failed, the automation pulls the recipient number and the error code and title from the event and posts them in Slack. You see which customer was not reached and why, while there is still time to phone them.

It is useful for any business where a missed message has a cost, like a missed booking or a late payment.

What you get out of it

  • Phone the customer who was missed

    A failure alert before an appointment gives staff time to call that person. A missed reminder becomes a short phone call instead of an empty chair and lost revenue. A message that failed while you were out can still be rescued if you see the alert the same afternoon.

  • Error code tells you the cause

    A code for an unreachable number points to bad data, while a template-related error points to your account setup. Knowing which saves time guessing and points you to the right fix.

  • Spot a systemic problem quickly

    If several failures arrive in a row with the same code, something is wrong beyond individual customers, such as an expired payment method or a paused template, and you can act at once.

  • Clean your contact list

    Repeated failures for the same number show who is not on WhatsApp. Removing or switching those contacts to another channel stops wasted sends and protects your quality rating. Over a few months that keeps your sending cleaner and your costs tied to people who can actually receive messages.

  • Proof for disputes

    When a customer says they never got a notice, the Slack record shows whether WhatsApp reported a failure, which helps resolve the question without argument. Without that record, you are left guessing whose side the fault was on, and the customer relationship takes the hit.

How it works

What happens, step by step

  1. Each time WhatsApp reports on a message you sent, ClickRuntime checks whether it was delivered.

  2. If delivery failed, it notes the recipient's number and the error WhatsApp gave.

  3. It posts a line to your #alerts Slack channel, such as "WhatsApp delivery failed to +447700900123: 131026 Message undeliverable", so you can reach them another way.

Before it runs live

  • Connect WhatsApp Business
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Get alerted when a WhatsApp message failsjust nowSucceeded
Slack · #alertsWhatsApp delivery failed to +447700900123: 131026 Message undeliverable

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other WhatsApp Business steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
failed_message_delivery_alert.pyexample
from clickruntime import on_event, notify

@on_event
def handle(event):
    value = event.json["entry"][0]["changes"][0]["value"]
    failed = [s for s in value.get("statuses", []) if s["status"] == "failed"]
    for s in failed:
        err = (s.get("errors") or [{}])[0]
        notify.slack(f"WhatsApp delivery failed to +{s['recipient_id']}: {err.get('code')} {err.get('title', '')}", channel="#alerts")
    return {"failed": len(failed)}

FAQ

Common questions

What kinds of errors does WhatsApp report?
Common reasons include the recipient not having WhatsApp, a number that cannot be reached, a message outside the allowed window, or a template problem. The event includes an error code and short title, which the Slack message repeats.
Does it alert on every failure, even one-offs?
Yes, every failed status produces a post. If that is too frequent for your volume, ask for it to post only after a certain number of failures in an hour, or to group them into a short summary.
Do I need to set up a webhook in Meta?
Yes. In your WhatsApp Business account settings, point the webhook at the address ClickRuntime gives you and subscribe to message events. Status updates are then delivered automatically and the automation reads the failed ones. A technical person may need to help the first time, but it is a one-off job.
What permissions does it need?
whatsapp_business_messaging. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Get alerted when a WhatsApp message fails” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.