Back to all tools
Needs API key

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

  1. In Telegram, message @BotFather, create a bot, and copy the bot token.
  2. 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).
  3. Replace YOUR_BOT_TOKEN in the Endpoint URL and YOUR_TELEGRAM_CHAT_ID in the request body.
  4. 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

notify_telegram_on_escalate

Description

Send a Telegram message to the team when this conversation needs a human. Call this when escalating to a human, after collecting the customer name and email.

Endpoint URL

Paste into Endpoint URL (https:// is added automatically).

api.telegram.org/botYOUR_BOT_TOKEN/sendMessage

HTTP method

POST

Tool inputs (all)

1. message (string) Escalation summary including customer name, email, and why a human is needed

Tool input: message

Input name

message

Input type

string

Input description

Escalation summary including customer name, email, and why a human is needed

Reference value

Use this as the request query or body value and choose “Tool input” in the form.

{{message}}

Request body (all)

chat_id: YOUR_TELEGRAM_CHAT_ID text: {{message}}

Field name

chat_id

Field value

YOUR_TELEGRAM_CHAT_ID

Field name

text

Field value

{{message}}

Headers (all)

Header values are encrypted when stored. Replace placeholders with your real secrets.

Content-Type: application/json

Header name

Content-Type

Header value

application/json
Telegram escalate notify custom tool | CXWizard