How to Create a Telegram Bot
In this guide, you'll create a Telegram bot that greets users and responds to commands. It takes about 10 minutes.
Prerequisites
- A TheQueue account
- A Telegram account
Step 1: Create a Bot in Telegram
- Open @BotFather in Telegram
- Send
/newbot - Enter a display name (e.g., "My Helper")
- Enter a username (must end with
bot, e.g.,my_helper_bot) - Copy the token — you'll need it next
Step 2: Create a Project in TheQueue
- Log in to your dashboard
- Click "Create Project"
- Enter a name and click "Create"
- The project opens in the visual editor
Step 3: Add a Telegram Trigger
- Right-click on an empty canvas area
- Select Triggers → Telegram
- Double-click the trigger block
- Paste the bot token in the
bot_apifield
Step 4: Add Logic
Right-click → Functions → Step. Inside the step, add:
/start Condition
Right-click → Functions → if:
"{=message=}" == "/start"
Welcome Message
In the then branch, add send_message:
Hello, {=tgData.from.first_name=}! I'm your helper bot.
Available commands:
/help — help
/info — information
Default Response
In the else branch, add send_message:
You wrote: {=message=}
Type /help for a list of commands.
Step 5: Save and Test
- Press Ctrl+S to save
- Open your bot in Telegram
- Send
/start— the bot will respond with a greeting - Send any text — the bot will respond with the default message
What's Next
- Add buttons for easy navigation
- Connect AI for smart responses
- Set up a multi-step dialog for data collection
- Integrate with CRM for sales automation