Automatically if bot receives a text message

Telegram Bot

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).


Information provided

When executed, this operation delivers the following data, which can be used in the same automatic task.

  • Tags

  • From User Id {{from_id}}

    ID of the user who sent the message.

  • Message Id {{message_id}}

    ID of the message.

  • Message Thread Id {{message_thread_id}}

    Thread ID if the message comes from a group with various topics.

  • From name {{from_name}}

    First name of the user who sent the message.

  • From username {{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.

  • From Chat Id {{chat_id}}

    ID of the chat where the message was sent.

  • User message {{text}}

    Text of the message.

  • Reply to message Username {{reply_to_message_username}}

    Username of the message being replied to.

  • Reply to message Text {{reply_to_message_text}}

    Text of the message being replied to.

  • Type of message {{type}}

    Type of message.


Frequently Asked Questions


How can I limit who can interact with my bot?

You can limit who can interact with your bot by using the 'Task runs when receiving updates from a specific user, group or channel' field in the bot's settings. This field allows you to specify specific users, groups or channels that are able to interact with the bot.

Why can't my bot see messages posted in a Telegram group?

By default, Telegram bots are configured not to listen to messages posted in groups. To allow your bot to see messages in the group, follow these steps:

  • - In your Telegram app, search for the contact @Botfather and enter his chat.
  • - Type the command /mybots in the chat to see the list of Telegram bots you have created.
  • - Select the corresponding bot from the list.
  • - Tap on the 'Group Privacy' option.
  • - Make sure the 'Privacy Mode' option is set to 'Off' so your bot can listen to messages posted by other users in the group.
Another way to ensure that your bot can see all messages posted by group users is to grant it administrator permissions in the group.

Common Errors


Bad Request: file is too big

Telegram does not allow bots to download files whose size exceeds 20MB.

Due to this Telegram limitation, messages sent to the bot with an attached file or document that exceeds this size cannot be processed.

This task requires you to send a message to your bot with text, an image, video, or an attached file

To start this specific automation, you need to open Telegram, search for your bot in your contacts, and send it a text message.

If you have also selected the option 'Only runs when receiving messages from a specific user, group, or channel,' you will need to send the message from the chat you have specified.

Write us

By email or by Telegram.
Monday to Friday from 7 a.m. to 1 p.m. (Spain).

Let's talk

Choose day and time.
We share the screen and answer all your questions.