Skip to content

The moment it happens

Run one support bot on WhatsApp and Telegram

Customers get the same answers whether they message your WhatsApp number or your Telegram bot, and questions the bot can't answer come to you.

Runs
The moment it happens
Apps
Telegram, WhatsApp Business
AI
Yes, uses the built-in AI allowance
Access
whatsapp_business_messaging; bot token

Send this to your assistant

Create a ClickRuntime automation: when a customer messages my WhatsApp number or my Telegram bot, answer from my FAQ text on the same app, and forward anything you can't answer to my Telegram chat.

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 business with customers in several countries finds some prefer WhatsApp and others Telegram. Keeping two sets of answers in sync, and watching two inboxes, doubles the work for the same questions.

One bot with one set of answers serves both apps, so every customer gets the same reply, and anything that needs a person is forwarded to one place for you to handle.

What you get out of it

  • One set of answers

    Update the FAQ once and both apps use it.

  • Customers use the app they like

    Nobody has to install something new to reach you.

  • One place for escalations

    Questions the bot can't answer all arrive in your Telegram chat.

  • Replies on the same app

    Customers always get their answer where they asked.

How it works

What happens, step by step

  1. A customer messages your WhatsApp number or your Telegram bot.

  2. The message is recognised as WhatsApp or Telegram and turned into the same simple format.

  3. AI answers from your FAQ text, or flags that a person is needed.

  4. The answer goes back on the same app, and anything flagged is forwarded to your Telegram chat.

Before it runs live

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

What you get

RunsThe moment it happens
Run one support bot on WhatsApp and Telegramjust nowSucceeded
Telegram · Owner chatNeeds a person (wa 4915112345678): Can you invoice Northwind GmbH with our VAT number?

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
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Telegram and 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.
one_ai_support_bot_on_whatsapp_and_telegram.pyexample
from clickruntime import on_event, credentials, http, ai

FAQ = "Open 9-6 CET. Shipping EU 3-5 days. Returns within 30 days."
OWNER_CHAT = 123456789
WA = "https://graph.facebook.com/v20.0/your-phone-number-id/messages"

def wa(to, text):
    http.post(WA, headers={"Authorization": f"Bearer {credentials.secret('WHATSAPP_TOKEN')}"},
              json={"messaging_product": "whatsapp", "to": to, "type": "text", "text": {"body": text}}).raise_for_status()
TG = "https://api.telegram.org"

def tg(chat_id, text):
    http.post(f"{TG}/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/sendMessage", json={"chat_id": chat_id, "text": text})

@on_event
def handle(event):
    body = event.json or {}
    if "message" in body:
        chats = [("tg", body["message"]["chat"]["id"], body["message"].get("text", ""))]
    else:
        msgs = [m for e in body.get("entry", []) for c in e["changes"] for m in c["value"].get("messages", []) if m["type"] == "text"]
        chats = [("wa", m["from"], m["text"]["body"]) for m in msgs]
    for app, who, text in chats:
        answer = ai.generate(text[:1500], max_output_tokens=200,
                             system=f"Answer briefly from these facts: {FAQ}. If you can't, reply exactly ESCALATE.").text.strip()
        if answer == "ESCALATE":
            answer = "Thanks, a person from our team will reply here shortly."
            tg(OWNER_CHAT, f"Needs a person ({app} {who}): {text[:500]}")
        wa(who, answer) if app == "wa" else tg(who, answer)
    return {"handled": len(chats)}

FAQ

Common questions

Can I reply to escalated customers?
The forwarded message includes the app and the customer's ID or number, so you can reply to them on that app.
Where is the FAQ kept?
As plain text in the automation's settings, editable in your ClickRuntime dashboard.
Do I need two trigger links?
No. Point both WhatsApp and Telegram at the same trigger link and the bot works out which app each message came from.
What permissions does it need?
whatsapp_business_messaging; bot token. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly 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 “Run one support bot on WhatsApp and Telegram” from your assistant

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