All nodes/Integrations/Telegram
Telegram Group History
Reads the recorded history of a Telegram chat: the messages the bot observed in a group or channel, including those that never triggered a workflow. Needs both the 'record group history' switch in the deployment AND privacy mode disabled on the bot (or admin rights) — otherwise the bot simply never sees the messages. A blank Chat ID means the chat of the running turn. Outputs: Messages (for LLMs), Records (raw rows carrying message_id/file_id) and Transcript (plain text).
Type in the graph: telegram_history
Exec
An error branch can be enabled (expose_error_output) to handle failures on their own path.
Try it
Minimal working workflow
- Execute
- Execute + Data
Runs as pasted
When to use it
Reach for this node when the workflow needs to know what actually happened in a group — including the messages that never started a turn. This is not the bot’s own conversation: Chat History returns the assistant’s dialogue with one person, while this is the many-voiced feed of a group or channel. When you need a keyword rather than “the last N messages”, use Search Messages.
How it works
The Bot API cannot hand back past messages — there is no “show me yesterday’s conversation” method. So this node reads the platform’s own recording and never calls Telegram at all. Recording is switched on in the deploy panel, under “Group history → Record group history”, and it is off by default. The second condition is the bot’s privacy mode: while it is on, Telegram shows the bot only commands, replies and mentions, so there is almost nothing to record. See the Telegram channel page.
The node has three outputs. Messages is an array an LLM node accepts as is: every line is
prefixed with its author, bots arrive as the assistant role and everyone else as user.
Records are the raw rows carrying message_id, media_file_id, date and author.
Transcript is the same text flattened into one string.
Common mistakes
- An empty result is not an error. The run still succeeds. There are usually three causes: recording is off, privacy mode is on, or the window and filters excluded everything. Start with the diagnostics button in the deploy panel.
- The limit counts backwards. With Since
7dand a limit of 50 you get the last 50 messages of that week, not the first. The output itself is oldest first. - Chat ID here is numeric only.
@channelusernameis not accepted (unlike the send node). A blank field means the chat of the running turn, so a run started from web chat, a schedule or the API stops with an error. - Messages carries no
file_id. To download an attachment, takemedia_file_idfrom the Records port and pass it to Get File. - Storage is finite. It is a ring buffer (“Messages kept per chat”) plus your plan’s retention period — old messages disappear quietly.
- Deletions are only half-visible. Messages removed by the Moderate node drop out of the results. Deletions made by a human inside Telegram do not: the Bot API never reports them.
Inputs
—
Outputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
Messagesoutput | Execute + Dataexecute_data | messages | |
Recordsrows | Datadata | array | |
Transcripttranscript | Datadata | string | |
Erroron_error | Execute + Dataexecute_data | — | shown when expose_error_output = true |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
Chat IDchat_id | string | "" | Numeric Telegram chat_id (an @username is not accepted here). Blank = the chat of the running Telegram turn. Templates are supported. supports templates |
Limitlimit | integer | 50 | How many of the most recent messages to return (oldest first in the output). |
Sincesince | string | "" | Window bound: an ISO timestamp (2026-07-01T00:00:00Z) or a window relative to now (30m, 24h, 7d). Blank = unbounded. supports templates |
Topic IDthread_id | string | "" | Only messages of this forum topic (message_thread_id). Blank = all topics. supports templates |
Untiluntil | string | "" | Window bound: an ISO timestamp (2026-07-01T00:00:00Z) or a window relative to now (30m, 24h, 7d). Blank = unbounded. supports templates |
From useruser_id | string | "" | Only messages by this author. Numeric Telegram user_id. Templates are supported. supports templates |
| Advanced | |||
Include botsinclude_bots | boolean | true | Include messages posted by bots. |
Include service eventsinclude_service | boolean | false | Include service events (members joining/leaving, title changes). |
Shared fields
Every node has these three — the platform adds them, not the node author.
expose_error_output— When enabled, show an execution output to connect nodes that run if this step fails.