logo_smallAxellero.io

Telegram

Telegram Bot API integration for automated messaging and chat management in Axellero workflows.

Telegram Node

Send messages, manage chats, and handle bot interactions through the Telegram Bot API in Axellero workflows.

Available Operations

  • Send: Send text messages to chats
  • Receive: Get updates and messages via long polling
  • Manage: Delete and edit existing messages
  • Actions: Show typing indicators and chat actions

Connection Configuration

ParameterTypeRequiredDescription
tokenTEXTYesBot token obtained from @BotFather
chatIdTEXTYesDefault chat ID for operations (can be overridden per method)
{
  "token": "{{ctx.consts.TELEGRAM_BOT_TOKEN}}",
  "chatId": "{{ctx.vars.chatId}}"
}

Operations

sendMessage

Send text messages to Telegram chats.

ParameterTypeRequiredDescription
messageTEXTYesText content of the message to send
{
  "message": "Hello! Your order #{{ctx.vars.orderNumber}} has been processed."
}

getUpdates

Retrieve pending updates from Telegram Bot API using long polling.

ParameterTypeRequiredDescription
offsetINTNoIdentifier of the first update to return
limitINTNoMaximum number of updates to retrieve (1-100)
timeoutINTNoLong polling timeout in seconds (0-90)
{
  "offset": 0,
  "limit": 10,
  "timeout": 30
}

deleteMessage

Remove messages from Telegram chats.

ParameterTypeRequiredDescription
messageIdINTYesUnique identifier of the message to delete
{
  "messageId": 123
}

editMessageText

Modify text content of existing messages in Telegram chats.

ParameterTypeRequiredDescription
messageIdINTYesUnique identifier of the message to edit
textTEXTYesNew text content for the message
{
  "messageId": 123,
  "text": "Updated: Your order status has changed to 'shipped'."
}

sendChatAction

Show typing indicators and other chat actions to users.

ParameterTypeRequiredDescription
actionTEXTYesAction type: typing, upload_photo, record_video, upload_video, record_voice, upload_voice, upload_document, choose_sticker, find_location, record_video_note, upload_video_note
{
  "action": "typing"
}

Workflow Integration

Use workflow context to construct dynamic message content:

{
  "message": "Hello {{ctx.user.name}}! Your order #{{ctx.vars.orderNumber}} for {{ctx.vars.productName}} has been confirmed. Total: ${{ctx.vars.totalAmount}}"
}

Bot Setup

  1. Create Bot: Message @BotFather on Telegram
  2. Get Token: Use /newbot command and follow instructions to get your bot token
  3. Find Chat ID: Add your bot to a chat and use getUpdates to find the chat ID
  4. Configure: Set up the connector with your bot token and target chat ID

Response Format

Success Response

{
  "success": true,
  "messageId": 456,
  "chatId": "-1001234567890"
}

Error Response

{
  "success": false,
  "error": "Bot was blocked by the user"
}

Use Cases

  • Customer notifications: Send order updates and delivery notifications
  • Alert systems: Notify users about important events and system status
  • Interactive bots: Build conversational interfaces for customer support
  • Monitoring: Send system alerts and monitoring notifications to operation teams