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
- Connect Integration: Connect to a service (e.g., Gmail, Slack)
- Configure Trigger: Set up the app event trigger
- Wait for Event: Workflow waits for the event
- 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:- 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:- Research available triggers
- List trigger options
- Show trigger slugs and descriptions
Common Trigger Slugs
| Service | Trigger Slug | Description |
|---|---|---|
| Gmail | GMAIL_NEW_GMAIL_MESSAGE | New email received |
| Slack | SLACK_RECEIVE_MESSAGE | New message in channel |
| GitHub | GITHUB_PULL_REQUEST_EVENT | Pull request event |
| GitHub | GITHUB_ISSUE_EVENT | Issue created/updated |
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 inboxsend_email: Send emailsearch_emails: Search emailscreate_label: Create email label
send_message: Send message to channelcreate_channel: Create new channelget_messages: Get channel messagesadd_reaction: Add reaction to message
Using Functions in Workflows
Functions are used automatically when you describe what you want:- Identifies required functions
- Uses them in generated code
- Handles authentication automatically
Function Discovery
Research available functions:- List all available functions
- Show function descriptions
- Provide usage examples
Trigger Types
Rilo supports three trigger types:1. Manual Trigger
Start workflows manually:2. Scheduled Trigger
Run workflows on a schedule:3. App Event Trigger
Start on external events:Creating Triggers
Via Natural Language
Describe the trigger:- Identify trigger type
- Configure trigger settings
- Set up filters if needed
Manual Configuration
Configure triggers in the workflow editor:- Select Start Block: Click on the start block
- Configure Trigger: Choose trigger type
- Set Parameters: Configure schedule or event
- Save: Trigger is saved automatically
Trigger Filters
App event triggers support filters to narrow down events:Gmail Filters
Slack Filters
Filters help reduce unnecessary workflow executions by only triggering on relevant events.
Best Practices
Use Appropriate Triggers
Use Appropriate Triggers
Choose the trigger type that best fits your use case. App events for real-time, scheduled for regular tasks.
Add Filters
Add Filters
Use filters to reduce unnecessary workflow executions and improve efficiency.
Test Triggers
Test Triggers
Test triggers before deploying to production to ensure they work as expected.
Monitor Execution
Monitor Execution
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
Troubleshooting
Trigger not firing
Trigger not firing
- Verify integration is connected
- Check trigger configuration is correct
- Ensure trigger slug matches exactly
- Review service logs for events
Too many triggers
Too many triggers
- Add filters to narrow down events
- Review trigger configuration
- Check for duplicate workflows
Function not available
Function not available
- Verify integration is connected
- Check OAuth scopes include function
- Ensure integration supports function
- Research available functions
Related Features
- MCP Libraries - Custom tools via MCP
- Custom Integrations - Custom API functions
- Integrations Overview - General integration information
Functions and triggers are powerful automation tools. Use them to create event-driven workflows that respond to changes in your connected services.