Guide

Multichannel messaging for AI agents

One flow, three channels, and a set of rules that are not interchangeable. The hard part is not the second API: it is consent, the sending window, and knowing when a fallback is help rather than noise.

Email is live on SES · WhatsApp through the Meta Cloud API · Telegram through Chatwoot

One call, whichever channel

Transactional, any channel
send_message {
  channel: "whatsapp",
  to: "+393331234567",
  templateId: "order-shipped",
  variables: { order: "4182" }
}

Same shape for all three, with the addressing each one needs: an email address, an E.164 number, a chat id. Outside the 24 hour window WhatsApp needs an approved template rather than free text, which is a Meta rule and not ours.

Fallback belongs in the flow, not in the prompt

A node in a graph automation
{ "id": "m1", "type": "message",
  "preferredChannel": "email",
  "fallbackChain": ["email", "whatsapp"],
  "templateByChannel": { "email": "<uuid>", "whatsapp": "<uuid>" },
  "next": "w2" }

The node declares a preferred channel and a chain to fall back through. The worker resolves the contact's identities and consent at that moment and picks the first channel that is actually available, so the decision is made against the state of the world rather than the model's memory of it.

Put a wait before the fallback. Falling back the instant an email is accepted means you are paying for a WhatsApp message to someone who was about to read the email.

What it costs when it is wrong

A WhatsApp template message costs materially more than an email, and the difference is per message. On ten thousand contacts, a fallback that fires too early is a bill you did not plan and a channel you have taught people to ignore. The cheapest correct answer is usually email first, with the paid channel reserved for what is time critical.

What we do not pretend

WhatsApp and Telegram need credentials from those platforms and, for WhatsApp, templates approved by Meta. We can orchestrate them; we cannot make that approval faster. If your use case is a single transactional email, none of this matters and a transactional-only provider will serve you fine.

Questions

Can an agent just send a WhatsApp message instead of an email?

Only inside the rules of that channel. Outside a 24 hour service window WhatsApp requires an approved template, and a contact who never consented for WhatsApp is not reachable there no matter what your email consent says. Consent is per channel, and so is the record of it.

What is cost arbitrage in this context?

Choosing the cheapest channel that still reaches the person. An email costs a fraction of a WhatsApp template message, so the sensible order is usually email first and the paid channel only for what matters or for what went unread.

Does a fallback mean sending the same thing twice?

No, and treating it that way is how people end up annoyed. A fallback fires when the first channel did not work, on a condition you set: not delivered, or not opened after a wait. Two copies of one message on two channels is not orchestration, it is noise.

Do I need separate templates per channel?

You need separate content. WhatsApp and Telegram have no HTML, no subject line and much less room. A flow can carry a template per channel, and the degraded version should be written rather than generated by stripping tags.

Other guides

Start with Sending

Give your agent something worth sending.

3,000 messages a month, free. No card. The MCP endpoint is on every plan, including this one.