Workflows
Blocks
Triggers
Event Trigger

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

ParameterTypeRequiredDescription
PlatformEnumYesSelect Telegram or Slack
Bot TokenStringYes (Telegram)Your Telegram bot token from BotFather
OAuth TokenStringYes (Slack)Your Slack app OAuth access token
Chat ModeBooleanNoEnable to respond to all messages (Telegram)
Event TypesArrayNoSpecific events to listen for
Custom Event NameStringNoDescriptive name for specific event handling

Supported Platforms

Telegram Bot Events

Event TypeDescriptionUse Case
Chat MessagesRespond to user messagesCustomer support bot
Bot CommandsHandle specific commands (e.g., /start)Interactive bot features
Group EventsProcess group interactionsTeam collaboration bots
Channel UpdatesMonitor channel activitiesContent publishing automation

Slack Events

Event TypeDescriptionUse Case
Message EventsReact to channel or direct messagesTeam notifications
App MentionsRespond when your app is mentionedInteractive assistants
Channel EventsTrack channel activitiesWorkspace automation
User ActionsMonitor user interactionsActivity tracking

Setup Guide

Telegram Setup

Step 1: Create Telegram Bot

  1. Contact @BotFather on Telegram
  2. Use /newbot to create a bot
  3. Copy the bot token (e.g., 123456789:ABCdef...)

Step 2: Configure Bot Token

  1. Enter the token in the trigger settings
  2. Click "Verify" to validate
  3. View bot name and status

Step 3: Event Configuration

  1. Enable Chat Mode for all messages
  2. Set a Custom Event Name for specific events
  3. Webhook URL is auto-configured

Step 4: Test Your Bot

  1. Find your bot on Telegram (search for the username you created)
  2. Send a message to your bot
  3. Check InditeAI - you should see your workflow trigger!

Slack Setup

Step 1: Create Slack App

  1. Visit api.slack.com/apps (opens in a new tab)
  2. Select "Create New App" and choose "From scratch"
  3. Name the app and select a workspace

Step 2: Configure Permissions

  1. Add scopes (e.g., chat:write, channels:history) in "OAuth & Permissions"
  2. Install the app and note the OAuth Access Token (e.g., xoxb-...)

Step 3: Event Subscription

  1. Enable "Event Subscriptions" in app settings
  2. Set the "Request URL" to your trigger's URL
  3. Subscribe to events (e.g., message.channels, message.im)

Configuration Options

OptionPlatformDescription
Bot Token VerificationTelegramEnsure the token is valid and active
Chat ModeTelegramEnable to respond to all messages
Custom Event NameBothUse descriptive names (e.g., user_signup)
OAuth Access TokenSlackAuthenticates API requests
Event SubscriptionsSlackManage subscriptions in Slack app settings
Bot UserSlackCustomize 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 Response

Automatically categorize and respond to customer inquiries.

Team Notification System

Event Trigger (Slack Mention) → Parse Request → Fetch Data → Post Update

Respond to team queries by fetching and posting relevant information.

Command-Based Actions

Event Trigger (Bot Command /report) → Generate Report → Send to Channel

Execute 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 TypeCauseSolution
Invalid TokenBot token (Telegram) or OAuth token (Slack) is invalidVerify and regenerate the token
Webhook UnreachableURL is not publicly accessibleEnsure URL uses HTTPS and is accessible
Event Not TriggeringIncorrect event subscriptionCheck event logs and platform documentation
Permission DeniedMissing required scopes (Slack)Add required scopes in app settings
Bot Not FoundDeleted or inactive botCreate 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 curl or 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

  1. Secure Your Tokens: Never share bot tokens or OAuth tokens publicly

  2. Use Descriptive Event Names: Name your events clearly for easier debugging

  3. Handle Rate Limits: Both Telegram and Slack have rate limits - design workflows accordingly

  4. Validate Event Data: Always validate incoming event data before processing

  5. Monitor Bot Activity: Regularly check logs to ensure your bot is responding correctly

  6. Test in Development: Use test workspaces or groups before deploying to production

  7. Implement Error Responses: Send helpful error messages to users when something goes wrong

  8. 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!

Indite Documentation v1.4.0
PrivacyTermsSupport