Telegram on escalate
Uses the Telegram Bot API to send a message to your team chat. Pair it with escalate_to_human so humans get an immediate heads-up.
Setup
- In Telegram, message @BotFather, create a bot, and copy the bot token.
- Add the bot to your team group (or start a chat with it). Get the chat ID (e.g. via @userinfobot or the getUpdates API).
- Replace YOUR_BOT_TOKEN in the Endpoint URL and YOUR_TELEGRAM_CHAT_ID in the request body.
- Add the prompt tip below so the agent notifies Telegram whenever it escalates.
Prompt tip
In your agent prompt, add: When you call escalate_to_human, also call notify_telegram_on_escalate with a short summary including the customer name, email, and reason.
Copy into custom tool form
Copy each value into the matching field when you add a custom tool on the create or edit agent page. Replace any YOUR_… placeholders with your real credentials.
Tool name
Description
Endpoint URL
Paste into Endpoint URL (https:// is added automatically).
HTTP method
Tool inputs (all)
Tool input: message
Input name
Input type
Input description
Reference value
Use this as the request query or body value and choose “Tool input” in the form.
Request body (all)
Field name
Field value
Field name
Field value
Headers (all)
Header values are encrypted when stored. Replace placeholders with your real secrets.
Header name
Header value
