Event Trigger
The Event Trigger block launches your workflow in response to real-time events from external services like Telegram or Slack, enabling dynamic automation driven by messages or interactions.
Smart Assistant: The Event Trigger watches for specific activities in your favorite apps (like Slack or Telegram) and automatically starts your workflow when something interesting happens.
Key Features
- Platform Support: Integrates seamlessly with Telegram and Slack
- Real-Time Execution: Triggers workflows instantly when events occur
- Event Flexibility: Supports diverse event types with filtering options
- Data Mapping: Extracts event data into workflow variables automatically
- Webhook Automation: Automatically manages webhook setup and configuration
- Secure Authentication: Stores credentials securely for each platform
Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
| Platform | Enum | Yes | Select Telegram or Slack |
| Bot Token | String | Yes (Telegram) | Your Telegram bot token from BotFather |
| OAuth Token | String | Yes (Slack) | Your Slack app OAuth access token |
| Chat Mode | Boolean | No | Enable to respond to all messages (Telegram) |
| Event Types | Array | No | Specific events to listen for |
| Custom Event Name | String | No | Descriptive name for specific event handling |
Supported Platforms
Telegram Bot Events
| Event Type | Description | Use Case |
|---|---|---|
| Chat Messages | Respond to user messages | Customer support bot |
| Bot Commands | Handle specific commands (e.g., /start) | Interactive bot features |
| Group Events | Process group interactions | Team collaboration bots |
| Channel Updates | Monitor channel activities | Content publishing automation |
Slack Events
| Event Type | Description | Use Case |
|---|---|---|
| Message Events | React to channel or direct messages | Team notifications |
| App Mentions | Respond when your app is mentioned | Interactive assistants |
| Channel Events | Track channel activities | Workspace automation |
| User Actions | Monitor user interactions | Activity tracking |
Setup Guide
Telegram Setup
Step 1: Create Telegram Bot
- Contact
@BotFatheron Telegram - Use
/newbotto create a bot - Copy the bot token (e.g.,
123456789:ABCdef...)
Step 2: Configure Bot Token
- Enter the token in the trigger settings
- Click "Verify" to validate
- View bot name and status
Step 3: Event Configuration
- Enable Chat Mode for all messages
- Set a Custom Event Name for specific events
- Webhook URL is auto-configured
Step 4: Test Your Bot
- Find your bot on Telegram (search for the username you created)
- Send a message to your bot
- Check InditeAI - you should see your workflow trigger!
Slack Setup
Step 1: Create Slack App
- Visit api.slack.com/apps (opens in a new tab)
- Select "Create New App" and choose "From scratch"
- Name the app and select a workspace
Step 2: Configure Permissions
- Add scopes (e.g.,
chat:write,channels:history) in "OAuth & Permissions" - Install the app and note the OAuth Access Token (e.g.,
xoxb-...)
Step 3: Event Subscription
- Enable "Event Subscriptions" in app settings
- Set the "Request URL" to your trigger's URL
- Subscribe to events (e.g.,
message.channels,message.im)
Configuration Options
| Option | Platform | Description |
|---|---|---|
| Bot Token Verification | Telegram | Ensure the token is valid and active |
| Chat Mode | Telegram | Enable to respond to all messages |
| Custom Event Name | Both | Use descriptive names (e.g., user_signup) |
| OAuth Access Token | Slack | Authenticates API requests |
| Event Subscriptions | Slack | Manage subscriptions in Slack app settings |
| Bot User | Slack | Customize the bot's name and icon |
Response Mapping
Map event data to workflow variables for dynamic processing:
{
"user_id": "{{event.user_id}}",
"message": "{{event.text}}",
"timestamp": "{{event.timestamp}}"
}Example Usage
Customer Support Bot
Event Trigger (Telegram Message) → Analyze Intent → Route to Agent → Send ResponseAutomatically categorize and respond to customer inquiries.
Team Notification System
Event Trigger (Slack Mention) → Parse Request → Fetch Data → Post UpdateRespond to team queries by fetching and posting relevant information.
Command-Based Actions
Event Trigger (Bot Command /report) → Generate Report → Send to ChannelExecute specific actions based on bot commands.
Node Display
The Event Trigger block displays:
- Platform: Telegram or Slack indicator
- Bot Status: Connected, verified, or error state
- Event Types: Which events are being monitored
- Last Event: Timestamp of the most recent trigger
- Webhook URL: Auto-generated URL for event subscriptions
Error Handling
| Error Type | Cause | Solution |
|---|---|---|
| Invalid Token | Bot token (Telegram) or OAuth token (Slack) is invalid | Verify and regenerate the token |
| Webhook Unreachable | URL is not publicly accessible | Ensure URL uses HTTPS and is accessible |
| Event Not Triggering | Incorrect event subscription | Check event logs and platform documentation |
| Permission Denied | Missing required scopes (Slack) | Add required scopes in app settings |
| Bot Not Found | Deleted or inactive bot | Create a new bot and reconfigure |
Troubleshooting
Invalid Token
- Verify bot token (Telegram) or OAuth token (Slack)
- Regenerate if inactive or deleted
Webhook Issues
- Test webhook URL with
curlor Postman - Ensure URL is publicly accessible
- Verify HTTPS is enabled
Event Not Triggering
- Check event logs for errors
- Review platform documentation for payload details
- Verify event subscriptions are correctly configured
Best Practices
-
Secure Your Tokens: Never share bot tokens or OAuth tokens publicly
-
Use Descriptive Event Names: Name your events clearly for easier debugging
-
Handle Rate Limits: Both Telegram and Slack have rate limits - design workflows accordingly
-
Validate Event Data: Always validate incoming event data before processing
-
Monitor Bot Activity: Regularly check logs to ensure your bot is responding correctly
-
Test in Development: Use test workspaces or groups before deploying to production
-
Implement Error Responses: Send helpful error messages to users when something goes wrong
-
Keep Tokens Updated: Regenerate tokens periodically for security
Security Note: Store your bot tokens and OAuth tokens securely. Never commit them to version control or share them publicly.
Next Step: Combine the Event Trigger with AI blocks to create intelligent chatbots that understand and respond to user messages naturally!