Skip to main content
Rilo supports app event triggers that automatically start workflows when events occur in connected services. Triggers enable event-driven automation without manual intervention.

Overview

Functions & Triggers include:
  • App Event Triggers: Start workflows on external service events
  • Custom Functions: Tools and methods available from integrations
  • Trigger Types: Manual, scheduled, and app event triggers
App event triggers enable true event-driven automation. Workflows start automatically when events occur, without manual triggers or schedules.

App Event Triggers

App event triggers start workflows when events occur in connected services.

How App Event Triggers Work

  1. Connect Integration: Connect to a service (e.g., Gmail, Slack)
  2. Configure Trigger: Set up the app event trigger
  3. Wait for Event: Workflow waits for the event
  4. Auto-Start: Workflow starts automatically when event occurs

Supported Trigger Events

Common app event triggers include:

Gmail

  • New email received
  • Email labeled
  • Email starred

Slack

  • New message
  • Channel created
  • User joined

GitHub

  • Pull request opened
  • Issue created
  • Push to repository

Salesforce

  • New lead created
  • Opportunity updated
  • Case created

Example: Gmail Trigger

Trigger Configuration:
{
  "trigger_type": "app_event",
  "app_trigger_slug": "GMAIL_NEW_GMAIL_MESSAGE",
  "filters": {
    "from": "[email protected]"
  }
}
Workflow Behavior:
  • Workflow starts automatically when new email arrives
  • Email data is available in the Start block
  • Workflow processes the email
App event triggers use exact trigger slugs from Composio. The AI agent researches available triggers when creating workflows.

Finding Available Triggers

Via Capability Research

The CapabilityResearchAgent can find available triggers:
"What triggers are available for Gmail?"
The agent will:
  • Research available triggers
  • List trigger options
  • Show trigger slugs and descriptions

Common Trigger Slugs

ServiceTrigger SlugDescription
GmailGMAIL_NEW_GMAIL_MESSAGENew email received
SlackSLACK_RECEIVE_MESSAGENew message in channel
GitHubGITHUB_PULL_REQUEST_EVENTPull request event
GitHubGITHUB_ISSUE_EVENTIssue created/updated
Trigger slugs must match exactly. Use get_tools_trigger_actions to find the correct slug for your use case.

Custom Functions

Custom functions are tools and methods available from integrations.

Integration Functions

Each integration provides functions (tools) you can use: Gmail Functions:
  • read_emails: Read emails from inbox
  • send_email: Send email
  • search_emails: Search emails
  • create_label: Create email label
Slack Functions:
  • send_message: Send message to channel
  • create_channel: Create new channel
  • get_messages: Get channel messages
  • add_reaction: Add reaction to message

Using Functions in Workflows

Functions are used automatically when you describe what you want:
"Read unread emails from Gmail and send summary to Slack"
The AI agent:
  • Identifies required functions
  • Uses them in generated code
  • Handles authentication automatically

Function Discovery

Research available functions:
"What functions are available for Gmail?"
The CapabilityResearchAgent will:
  • List all available functions
  • Show function descriptions
  • Provide usage examples

Trigger Types

Rilo supports three trigger types:

1. Manual Trigger

Start workflows manually:
{
  "trigger_type": "manual"
}
Use Case: On-demand workflow execution

2. Scheduled Trigger

Run workflows on a schedule:
{
  "trigger_type": "scheduled",
  "schedule": "daily at 9 AM"
}
Use Case: Regular automated tasks

3. App Event Trigger

Start on external events:
{
  "trigger_type": "app_event",
  "app_trigger_slug": "GMAIL_NEW_GMAIL_MESSAGE"
}
Use Case: Event-driven automation
Each workflow can have exactly one trigger type. You cannot combine trigger types (e.g., “daily at 9 AM OR when new email arrives”). Create separate workflows if you need multiple trigger types.

Creating Triggers

Via Natural Language

Describe the trigger:
"Start workflow when new email arrives from [email protected]"
The TriggerGeneratorAgent will:
  • Identify trigger type
  • Configure trigger settings
  • Set up filters if needed

Manual Configuration

Configure triggers in the workflow editor:
  1. Select Start Block: Click on the start block
  2. Configure Trigger: Choose trigger type
  3. Set Parameters: Configure schedule or event
  4. Save: Trigger is saved automatically

Trigger Filters

App event triggers support filters to narrow down events:

Gmail Filters

{
  "app_trigger_slug": "GMAIL_NEW_GMAIL_MESSAGE",
  "filters": {
    "from": "[email protected]",
    "subject_contains": "urgent"
  }
}

Slack Filters

{
  "app_trigger_slug": "SLACK_RECEIVE_MESSAGE",
  "filters": {
    "channel": "#alerts",
    "mentions": "@here"
  }
}
Filters help reduce unnecessary workflow executions by only triggering on relevant events.

Best Practices

Choose the trigger type that best fits your use case. App events for real-time, scheduled for regular tasks.
Use filters to reduce unnecessary workflow executions and improve efficiency.
Test triggers before deploying to production to ensure they work as expected.
Monitor workflow executions to ensure triggers are firing correctly.

Limitations

Trigger Limitations

  • Single trigger per workflow: Each workflow has exactly one trigger
  • No trigger combinations: Cannot combine multiple trigger types
  • Filter limitations: Filters depend on service capabilities
  • Rate limits: Subject to service rate limits

Function Limitations

  • Integration-dependent: Functions depend on connected integrations
  • OAuth scopes: Limited to granted OAuth permissions
  • API rate limits: Subject to service API limits
  • Service availability: Depends on external service availability
Understand trigger and function limitations to set appropriate expectations and design workflows accordingly.

Troubleshooting

  • Verify integration is connected
  • Check trigger configuration is correct
  • Ensure trigger slug matches exactly
  • Review service logs for events
  • Add filters to narrow down events
  • Review trigger configuration
  • Check for duplicate workflows
  • Verify integration is connected
  • Check OAuth scopes include function
  • Ensure integration supports function
  • Research available functions

Functions and triggers are powerful automation tools. Use them to create event-driven workflows that respond to changes in your connected services.