Nodes2Cloud
Nodes2CloudDocs
Integrations

Telegram

Build advanced Telegram bots and automate messages

Telegram Integration

The Telegram integration is one of the most powerful integrations in Nodes2Cloud, fully supporting rich messages, inline keyboards, callbacks, media attachments, and conversational flows using the Telegram Bot API.

How to get credentials

You need a Bot Token from the BotFather.

  1. Open Telegram and search for the @BotFather.
  2. Send the command /newbot.
  3. Follow the prompts to set a name and a username for your bot.
  4. BotFather will reply with an HTTP API token (e.g., 123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ).
  5. In Nodes2Cloud, create a new Telegram credential and paste this token.

1. Sending Messages

Telegram supports sending a massive variety of content types. Most of these require a Chat ID, which can be a user's private ID, a group ID, or a public channel username (e.g., @mychannel).

Available Actions

  • Send a Text Message: Sends standard or markdown-formatted text.
  • Send an Animated File / Audio / Document / Photo / Video / Sticker: Uploads and sends various media files.
  • Send a Location: Sends a map pin.
  • Send a Media Group Message: Sends an album of multiple photos/videos.
  • Send a Chat Action: Shows a typing/uploading indicator (e.g., "Bot is typing...").

2. Rich Messages & Interactions

Nodes2Cloud includes specialized nodes for building interactive bots:

Available Actions

  • Send a Rich Message: A powerful node that lets you easily build Inline Keyboards (buttons attached to messages) and Reply Keyboards (custom keyboards replacing the user's normal keyboard) using a visual builder instead of raw JSON.
  • Answer Query a Callback: When a user clicks an Inline Keyboard button, Telegram sends a callback query. You must answer this query using this node to remove the loading spinner on the user's button.
  • Answer an Inline Query Callback: Responds to inline queries (e.g., when a user types @yourbot search).
  • Send Message and Wait for Response: A specialized conversational node. It sends a message and pauses the workflow execution. When the user replies to the bot, the workflow automatically resumes from that exact point, injecting the user's reply into the flow.

3. Chat & Message Management

Available Actions

  • Edit / Delete a Text Message: Modifies or removes existing messages (requires the Message ID).
  • Pin / Unpin a Chat Message: Manages pinned messages in groups/channels.
  • Set Description / Title on a Chat: Modifies group/channel metadata.
  • Get a Chat / Member / Administrators: Retrieves metadata about users and groups.
  • Leave a Chat: Forces the bot to leave a group.
  • Get a File: Retrieves file information to download attachments sent to the bot.

Common Troubleshooting

  • Bot not responding to messages in groups: By default, Telegram bots operate in "Privacy Mode" and only receive messages that start with a slash / or explicitly mention the bot. To receive all messages in a group, you must ask @BotFather to disable Privacy Mode for your bot.
  • 400 Bad Request (Chat not found): Ensure the Chat ID is correct. If the bot is trying to message a user directly, the user must have started a conversation with the bot first (bots cannot initiate conversations with users).
  • Inline Keyboard buttons spinning forever: You are receiving the callback event but forgetting to execute the Answer Query a Callback node in your workflow. Telegram requires you to acknowledge every button press.

On this page