Trigger Nodes
Triggers are the starting points of your flows. They listen for events from Telegram and start execution when criteria are met.
🎯 Universal Trigger (trigger.on)
The Universal Trigger is the most powerful node in BotGami. It can listen for almost anything using a simple filter language.
Configuration
| Setting | Description |
|---|---|
| Filter | A query string defining what updates to catch. |
Common Filters
| Filter Query | Listens For | Dynamic Outputs |
|---|---|---|
message:text | Text messages | Text, Message |
message:photo | Photos | Photo, Caption, FileID |
message:voice | Voice notes | Voice, Duration, FileID |
button | Any button click | Data, Message |
my_chat_member | Bot added/removed | NewStatus, User |
Dynamic Outputs
This node is smart. When you change the filter, the output sockets change automatically!
- If you use
message:photo, you get aPhotosocket. - If you use
message:location, you getLatitudeandLongitudesockets.
⚡ Command Trigger (trigger.command)
A simplified trigger specifically for matching commands.
| Setting | Description |
|---|---|
| Command | The command to listen for (e.g., /start, /help). |
Outputs:
Message: The full text of the message.Args: A list of arguments (e.g.,/start promo_code->["promo_code"]).
⏰ Schedule Triggers
Cron Trigger (sys.cron_trigger)
Fires periodically based on a CRON schedule (e.g., "Every Monday at 9am").
- Expression:
0 9 * * 1
Scheduled Task (sys.scheduled_trigger)
Fires when a delayed task (set by a Schedule flow node) executes.
System Triggers
🏁 Start Up (sys.on_start)
Runs once when the bot boots up. Use this to initialize global variables or load configurations.
Note: No user context is available here!
⚠️ Error Handler (sys.on_error)
Catches any unhandled errors from other flows. Connect this to logging logic to keep track of bugs.
Trigger Priority
- System Triggers (Level 0) run on startup.
- Global Triggers (Level 1) run on every message (good for spam filters or maintenance mode checks).
- Conversation Triggers (Level 2) are your standard
trigger.onandtrigger.commandnodes.