All posts
n8nTelegramautomationbots

Master All Telegram Triggers In n8n

Renato Dinis

n8n has seven distinct Telegram triggers. Most people use one or two and guess at the rest. This covers all of them — what each one fires on, why you'd use it, and how to wire it up.

flowchart LR
  T[Telegram event] --> R{Event type}
  R -->|Direct message| T1[On Message]
  R -->|Edit a message| T2[On Edited Message]
  R -->|Channel post| T3[On Channel Post]
  R -->|Edit channel post| T4[On Edited Channel Post]
  R -->|@bot inline query| T5[Inline Query]
  R -->|Poll closed| T6[Poll]
  R -->|Button click| T7[Callback Query]

Before anything: create the bot

Go to Telegram, search for BotFather, and start a conversation. Send /newbot, give it a name, then a username (must end in bot).

BotFather returns a token. Copy it.

Back in n8n, click the plus sign on any canvas, search Credentials, and add Telegram API. Paste the token. Give the credential a recognizable name — you'll reference it across multiple triggers.


Trigger 1: On Message

Fires every time someone sends a direct message to the bot.

Use case: A user sends "500k launch" as a shorthand expense log. The workflow processes the message with an AI agent and appends the entry to a Google Sheet.

Setup: Add the trigger, select your Telegram credential, click Execute to start listening. Open Telegram, send the bot a message. The trigger catches it.


Trigger 2: On Edited Message

Fires when a user edits a previously sent message.

Use case: The same user who logged "500k" realizes it was a typo and edits to "501k." The trigger catches the edit, finds the original entry in the sheet, and updates it.

Setup: Same as above. Execute the workflow, go to the previous message in Telegram, edit it. The trigger fires with the updated text.


Trigger 3: On Channel Post

Fires when a new post is published in a Telegram channel.

Use case: An announcement posts in your company channel. The bot catches it, reformats the text, and cross-posts to X, LinkedIn, and Slack automatically.

Setup:

  1. Create a Telegram channel.
  2. Open the channel settings, go to Administrators, and add your bot by username.
  3. In n8n, configure the trigger with your bot credential.
  4. Execute, then post something in the channel. The trigger fires.

Trigger 4: On Edited Channel Post

Fires when a post in a channel is edited — same mechanic as Trigger 2, but for channels instead of direct messages.

Setup: Configure the credential, start listening, then edit an existing post in your channel. The trigger catches the updated content.


Trigger 5: Inline Query

Fires when a user invokes your bot using the @botname query syntax from any chat — not just channels where the bot is a member.

Use case: Someone types @yourbotname get me bitcoin price in any Telegram chat. Your workflow receives the query and can respond with live data.

Setup:

  1. Go back to BotFather, find your bot, open Bot Settings > Inline Mode, and enable it.
  2. In n8n, configure the trigger with your credential and execute.
  3. Open any Telegram chat (or DM), type @yourbotname get me bitcoin price. The trigger fires with the full query text.

Trigger 6: Poll

Fires when a poll is updated — specifically when the poll ends (is stopped).

Use case: You run a weekly poll in your team channel to collect feedback. When the poll closes, the trigger fires, reads the results, and logs them to a spreadsheet.

Setup:

  1. Make sure your bot is an admin of the channel where polls will run.
  2. Configure the trigger, execute it.
  3. Go to the channel. Click the attachment icon and create a poll. Vote on it. Then stop the poll. The trigger fires with the vote counts for each option.

Trigger 7: Callback Query

Fires when a user clicks a button on an inline keyboard attached to a bot message.

Use case: Your bot sends a message: "Deployment ready — proceed?" with Yes and No buttons. When the user clicks Yes, this trigger fires and the workflow continues.

Setup:

You need a workflow that first sends a message with an inline keyboard. Here's the structure:

{
  "text": "Deployment ready, proceed?",
  "reply_markup": {
    "inline_keyboard": [
      [{ "text": "Yes", "callback_data": "option_1" }],
      [{ "text": "Not ready", "callback_data": "option_2" }]
    ]
  }
}

Run that sender workflow first to create the keyboard. Then start listening with the Callback Query trigger. Click a button in Telegram — the trigger fires and you see callback_data containing option_1 or option_2, whichever button was pressed.


Which trigger to use when

Situation Trigger
User sends a command or message On Message
User corrects a message On Edited Message
New post in a public/private channel On Channel Post
Cross-chat bot invocation Inline Query
Poll results Poll
User clicks a button in a bot message Callback Query

The free workflow file linked in the video description includes all seven triggers wired up. Import it, connect your credentials, and use it as a reference.


If you're building Telegram automations for a business process and need production-level reliability, get in touch. We build n8n workflows end to end.

Need this built for your business?

Atuals builds custom AI agents and workflows. Drop us a note — we reply within 24 hours with an honest take on whether we can help.


Atualsatuals
© 2026 Atuals · AI automation agency