The moment it happens
Answer Telegram bot messages and escalate urgent ones to Slack
Every message to your Telegram bot gets an instant reply, and complaints or urgent requests are posted to your Slack support channel.
- Runs
- The moment it happens
- Apps
- Slack, Telegram
- AI
- Yes, uses the built-in AI allowance
- Access
- Telegram bot token; Slack chat:write
Send this to your assistant
Create a ClickRuntime automation: when someone messages my Telegram bot, classify the request with AI, reply with an acknowledgment, and post complaints or urgent ones to #support in Slack.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A delivery business lets customers contact it through a Telegram bot, but the bot only collects messages. Staff check them a few times a day, so a customer whose order went to the wrong address waits hours for any sign that someone saw it, and routine questions take up the same attention as real problems.
Replying to everyone right away and pushing only the urgent messages into Slack lets the team spend its time where it matters, while every customer knows their message arrived.
What you get out of it
Every customer gets a reply
Each message gets an acknowledgment within seconds, matched to what they asked. Customers stop sending the same question three times.
Urgent problems reach staff fast
Complaints and urgent requests are posted in #support as they arrive. The team handles them first instead of finding them in a long queue.
Routine questions stay out of Slack
Simple questions are acknowledged without pulling anyone in. The support channel only shows what needs a person.
Context travels with the alert
The Slack post includes the customer's message and the category. Whoever picks it up knows what they are dealing with before replying.
How it works
What happens, step by step
When someone messages your Telegram bot, Telegram passes the message to ClickRuntime straight away.
AI reads the message and decides its category, whether it is urgent, and a short reply.
The customer gets that reply in Telegram within seconds.
Complaints and urgent messages are posted to your #support Slack channel, once per conversation.
Before it runs live
- Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
- Connect Telegram
- Paste your automation's link into the other app's webhook settings
What you get
Build your own
Need it to work differently?
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 Google Sheets
- Combine it with other Slack and Telegram steps into one automation
Under the hood
The code that runs this automation
from slack_sdk import WebClient
from clickruntime import on_event, credentials, http, state, ai
SCHEMA = {"type": "object", "properties": {"category": {"type": "string"}, "urgent": {"type": "boolean"}, "reply": {"type": "string"}}}
@on_event
def handle(event):
msg = (event.json or {}).get("message") or {}
text, chat = msg.get("text"), (msg.get("chat") or {}).get("id")
if not text or not chat:
return {"skipped": "no text"}
try:
out = ai.generate(f"Customer message to a delivery company:\n{text[:2000]}\nGive category, urgent (complaint or time-critical), and a short polite reply.",
max_output_tokens=200, json_schema=SCHEMA).json
except ai.AIError:
out = {"category": "unknown", "urgent": True, "reply": "Thanks, we got your message and a person will reply shortly."}
http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/sendMessage", json={"chat_id": chat, "text": out["reply"]})
key = f"escalated:{chat}"
if out["urgent"] and not state.get(key):
who = (msg.get("from") or {}).get("first_name", "Customer")
WebClient(token=credentials.connection("slack", "work")).chat_postMessage(
channel="#support", text=f":rotating_light: {out['category']} from {who} (chat {chat}):\n> {text[:1000]}")
state.set(key, msg.get("date"))
return {"category": out["category"], "urgent": out["urgent"]}FAQ
Common questions
How does the team reply to the customer?
What counts as urgent?
Does it remember earlier messages from the same customer?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Post GitHub pushes, pull requests and issues to Slack and Telegram
Activity from all your GitHub repositories appears in one Slack channel and on your Telegram, as it happens.
See how it worksSend error and status alerts to Slack and Telegram
Any failure or status change sent to your trigger link reaches both Slack and Telegram, with repeats filtered out.
See how it worksAnnounce subscriptions, cancellations and failed payments in Slack and Telegram
Every new subscription, cancellation and failed payment is posted to your revenue channel in Slack and sent to you on Telegram.
See how it worksKeep exploring
Set up “Answer Telegram bot messages and escalate urgent ones to Slack” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.