Incoming Message Trigger
The incoming message trigger starts a workflow every time a user sends a message to the bot. This is the most common trigger type.
Adding
- Right-click on an empty canvas area
- Select Triggers → New Trigger on Incoming Message
- Add a Step and functions inside it
How It Works
For each incoming message:
- The trigger activates
- The message text is saved to the
{=message=}variable - Sender data is available via
{=tgData=} - All functions in the trigger's steps execute in order
Available Data
| Variable | Description |
|---|---|
{=message=} |
Message text |
{=tgData.from.id=} |
User ID |
{=tgData.from.first_name=} |
First name |
{=tgData.from.username=} |
Username |
{=tgData.chat.id=} |
Chat ID |
Filtering Messages
Use the if function to handle different commands:
if "{=message=}" == "/start" → greeting
if "{=message=}" == "/help" → help
else → default response
Multiple Triggers
You can create multiple triggers in a single project — each with its own processing logic.