Trigger Nodes
Telegram Bot

Telegram Bot Trigger

The Telegram Bot is a handy trigger within BuildShip that enables you to handle incoming messages in Telegram chat or Telegram group with a visual workflow builder.

This trigger allows you to easily manage Telegram groups, moderate and respond with meaningful messages and even include OpenAI in your workflow to generate meaningful responses to assist users in your group.

Telegram Bot Trigger

Pre-requisites ✅

  1. Telegram bot API key - The API keys of the Telegram bot that will be responding to the incoming messages. To setup a bot and get the API key, follow the instructions here.
  2. Telegram group Chat ID - This is the group on which your Telegram bot will operate and listen to messages and send responses to. To learn how setup a group and get chat id, go here.

Step to create a Telegram Bot workflow

Add the Telegram Bot Trigger

Add the telegram bot's API Key, that you can get from this step.
Also, optionally you can add a Verification Code if you want incoming requests to be verified.

Telegram Bot Trigger

Add "Send Telegram message" Node

  • Next to you workflow, add a node by searching in the node explorer for "Send Telegram message" node to reply to incoming messages.
  • Add the "Chat ID" of the group that you want the bot to reply to.
  • To this node also add the response "Text" that you want the bot to reply with. We have added here, a generic message of "Welcome to the group...".
  • You can however, add nodes like OpenAI text generation to respond with AI, or even verify if the incoming message is from a Stripe paying user before responding
  • There is full flexibiliy to add more nodes and handle what your bot is replying with.

    Telegram Bot Trigger

Return success status and click Ship

Finally, add a "Return" node that will respond with a success status. And click the "Ship" button to deploy the workflow

Send a message to Test

Finally, you can send a message and test the response is as expected.

Telegram Bot Trigger

That's it 🎉

This is a starting point, you can tweak this anyway you like.

How to setup a Telegram bot and get API key

  1. Enter @BotFather in the search tab and select the verified bot with tick mark that shows up.

    Telegram Bot
  2. Click Start to activate the BotFather bot. You will receive a list of commands to manage the bots.
  3. Choose or type the /newbot command and click Send.
  4. Choose a name for your bot. Your subscribers will see it in their conversations. Next, choose a username for your bot. The bot can be found by its username in the search bar. The username must be unique and end with the word “bot.”
  5. Once you've made your selection for your bot's name, your bot will be brought to life. Shortly thereafter, you'll receive a message containing a link leading to your bot, which can be accessed at "t.me/[bot_username] as well as your API key.
  6. Make note of this API key as this is what you will need to use in the Telegram Trigger node on BuildShip.

    Telegram Bot

How to setup a Telegram group and get chat id

  1. Create a group on Telegram
  2. Invite the bot you created in the previous steps
  3. Also search and invite "RawDataBot" to your group.

    Telegram Bot
  4. Once you invite this RawDataBot to your group, it will post a message with the Chat ID of this group. Make a note of it for use in the Step 2 of your Telegram workflow.

    Telegram Bot Trigger

Setup Telegram Bot for individual user

  1. Search for @userdetailsbot on telegram to get your personl UID.
  2. Add the UID generated by Userinfo | Get id bot in teh chat ID of the Send Telegram Messaging Node.
  3. Search for your created Bot on Telegram and click start.
  4. Start chatting with your Bot.
    Telegram Bot user details bot
🙋🏻

Need help? Chat with us and our community of low-code/no-code builders and developers on Discord (opens in a new tab).