# Instantly when receiving a text message — Telegram Bot Botize method — `telegrambot.webhook` (trigger). It is triggered every time a user sends a text message to the bot or to a group/channel where the bot is located. - You can choose to trigger the task for any message received or only for those that are preceded by a specific command (a word). This is a trigger: it starts the task. A task has exactly one. ## Fields you set The field's internal name, its type and the values it accepts. These fields accept `{{...}}` tags from earlier steps. - `type` *(string, one of: "any" = Task runs when receiving any update; "command" = Task runs when receiving updates that begin with this word, default: "any")* - `command` *(string)* - `chat_source` *(string, one of: "any" = Task runs when receiving updates from anyone; "target" = Task runs when receiving updates from a specific user, group or channel, default: "any")* - `chat_id` *(string)* - `mb_outputvars_switch` *(boolean)* — Customize tags ## Output variables Data this step makes available. Reference them in later steps with the double-brace tag. - `{{from_id}}` *(int)* — From User Id. ID of the user who sent the message. - `{{message_id}}` *(int)* — Message Id. ID of the message. - `{{message_thread_id}}` *(int)* — Message Thread Id. Thread ID if the message comes from a group with various topics. - `{{from_name}}` *(text)* — From name. First name of the user who sent the message. - `{{from_username}}` *(text)* — From username. Username of the user who sent the message. By default, Telegram users don't have a username, so only people who have their phone number can send them messages. If a user has a username, anyone can send them messages through the link https://t.me/username, and they will appear in Telegram search with their username. - `{{chat_id}}` *(text)* — From Chat Id. ID of the chat where the message was sent. - `{{text}}` *(text)* — User message. Text of the message. - `{{reply_to_message_username}}` *(text)* — Reply to message Username. Username of the message being replied to. - `{{reply_to_message_text}}` *(text)* — Reply to message Text. Text of the message being replied to. - `{{type}}` *(text)* — Type of message. Type of message. - `{{forward_from_id}}` *(int)* — Forwarded from chat Id. ID of the chat from which this message was forwarded - `{{story_id}}` *(int)* — Story Id. Filled in only when the message is a shared Telegram story. Telegram does not give bots the content of a story, only the channel that published it and this id. - `{{story_chat_id}}` *(text)* — Story channel Id. Id of the channel that published the story - `{{story_chat_title}}` *(text)* — Story channel name. Title of the channel that published the story - `{{story_chat_username}}` *(text)* — Story channel username. Username of the channel that published the story - `{{story_url}}` *(text)* — Story URL. Public link to the story. Empty if the channel has no username - `{{language_code}}` *(text)* — Language code. IETF language tag of the user's Telegram client ('es', 'en-GB', 'pt-BR'). Optional: Telegram only sends it when the user has a language set, so it may arrive empty. ## Account Needs a connected Telegram Bot account in Botize: https://botize.com/en/app/telegrambot/authenticate ## This app Every trigger and action for Telegram Bot: https://botize.com/en/app/telegrambot.md ## How to build this An AI assistant (Claude, ChatGPT, Cursor…) can create and edit these tasks in the user's account through the Botize MCP connector, included in every plan: https://webhook.botize.es/mcp - Connection guide: https://botize.com/en/mcp - Agent map: https://botize.com/llms.txt - New account: https://botize.com/en/join (500 free operations, no card) --- Machine-readable summary for AI assistants. Human version: https://botize.com/en/method/telegrambot/webhook