Telegram Bot Trigger

The Telegram Bot is a handy trigger within BuildShip that enables you to handle incoming messages in Telegram chats.

This trigger allows you to easily manage Telegram Bot, moderate and respond with meaningful messages and even include OpenAI in your workflow to generate meaningful responses to assist users. Create a bot and share it with your users to directly interact with your Telegram Bot and get responses.

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.

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

Clone the Telegram Bot Assistant Template

Clone this template to get started with the Telegram Bot by just adding your token.

Telegram Assistant Template

Search Telegram Bot and publish it to Telegram and share with users

  1. Search for @userdetailsbot on telegram to get your personl UID.
  2. Add the UID generated by Userinfo | Get id bot in the chat ID of the Send Telegram Messaging Node. (optional if using from the template - the ID is passed as variable from the trigger response)
  3. Search for your created Bot on Telegram and click start.
  4. Start chatting with your Bot.
    Telegram Bot user details bot

Step to create a Telegram Bot workflow manually

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.

Verification Code (optional)

Telegram Bot API provides a verification code to ensure requests to your bot's webhook are coming from Telegram itself. This code is a random string sent in the X-Telegram-Bot-Api-Secret-Token header with each update request. You can use this code to verify that the request is coming from Telegram and not from a third-party source. If you want to use this feature, you can generate a random string and add it to the Verification Code field in the Telegram Bot Trigger node. This code will be sent in the X-Telegram-Bot-Api-Secret-Token header with each update request to your bot's webhook. You can then verify this code in your workflow to ensure the request is coming from Telegram.

To set the verification code, you can add the code in the Verification Code field in the Telegram Bot Trigger node and send it to the headers of te incoming request to your webhook. To know more about Telegram Bot verification code you can refer to this link (opens in a new tab).

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. (Use the Telegram Assistant Template to skip adding the ChatID (and fetch it dynamically from the Trigger Response))
  • 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 🎉

💡

Use the Telegram Bot Assistant to create a Telegram Bot workflow without the need to add the Chat ID manually and start by just setting up the bot and passing the access token. customers.

Need Help?

  • 💬
    Join BuildShip Community

    An active and large community of no-code / low-code builders. Ask questions, share feedback, showcase your project and connect with other BuildShip enthusiasts.

  • 🙋
    Hire a BuildShip Expert

    Need personalized help to build your product fast? Browse and hire from a range of independent freelancers, agencies and builders - all well versed with BuildShip.

  • 🛟
    Send a Support Request

    Got a specific question on your workflows / project or want to report a bug? Send a us a request using the "Support" button directly from your BuildShip Dashboard.

  • ⭐️
    Feature Request

    Something missing in BuildShip for you? Share on the #FeatureRequest channel on Discord. Also browse and cast your votes on other feature requests.