For the complete documentation index, see llms.txt. This page is also available as Markdown.

Telegram

Integration with the Telegram Bot API for sending messages and reading chat updates through a bot.

Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

Connector
Authentication

Telegram

Bot Token

Telegram

Connect a Telegram bot with a token from @BotFather to send messages and read chat updates.

Set up in Telegram

  1. Prepare the Telegram account or service that the workflow will access. Grant access to the required resources and operations.

  2. Bot Token: Your Telegram bot token from @BotFather. Open Telegram, message @BotFather, run /newbot (or /token for an existing bot), and copy the token it returns.

Set up in StackAI

  1. Open Settings → Connections, add a connection, and select Telegram.

  2. Enter the credentials and connection details in the fields below.

  3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

Connection fields

StackAI field
Required
What to enter

Bot Token

Yes

Your Telegram bot token from @BotFather. Open Telegram, message @BotFather, run /newbot (or /token for an existing bot), and copy the token it returns. Provider instructions.

Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

Use an action

  1. Add the required Telegram action to the workflow.

  2. Select a connection when the action requests one.

  3. Complete the required fields. Use the reference picker when a value comes from another workflow step.

  4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

Actions

Get bot info

Get details about the connected Telegram bot, and confirm the token works.

Inputs

No input fields are required in this catalog entry.

Outputs

Field
Type
Description

Bot

object

The connected Telegram bot's account details.

Get chat

Look up details about a Telegram chat, group, or channel by its id or username.

Inputs

Field
Type
Required
Description

Chat ID

string

Yes

The chat to look up, as a numeric id or a public @username.

Outputs

Field
Type
Description

Chat

object

The chat's details.

Get updates

Read recent messages sent to the bot. Use this to find a chat id: message the bot, then run this action and read the chat id from the result.

Inputs

Field
Type
Required
Description

Maximum updates

integer

No

The maximum number of updates to return (1-100). Minimum: 1. Maximum: 100. Default: 100.

Offset

integer

No

Only return updates with an id at or above this value. Use the next_offset from a previous call to page forward and skip updates you already read.

Outputs

Field
Type
Description

Updates

object_array

Recent updates, each with the chat id, sender, and message text.

Next offset

number

Pass this back as Offset next time to read only newer updates.

Send message

Send a text message from the bot to a Telegram chat, group, or channel.

Inputs

Field
Type
Required
Description

Chat ID

string

Yes

The chat to send the message to, as a numeric id or public @username.

Message

textarea

Yes

The message text to send (up to 4096 characters).

Format

select (string)

No

How to format the text. Leave empty to send as plain text. Available values: HTML, MarkdownV2, Markdown (legacy).

Send silently

boolean

No

Deliver the message without a notification sound.

Hide link preview

boolean

No

Do not show a preview card for links in the message.

Outputs

Field
Type
Description

Message

object

The sent message.

Important behavior

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.

Last updated

Was this helpful?