Flow Triggers
Flows can be triggered by different events:Event Trigger
Run flows when data changes occur:Available Events
- items.create - After item creation
- items.update - After item update
- items.delete - After item deletion
- auth.login - User login
- files.upload - File upload
Schedule Trigger
Run flows on a schedule using cron syntax:*/5 * * * *- Every 5 minutes0 9 * * 1- Every Monday at 9 AM0 0 1 * *- First day of every month
Webhook Trigger
Create HTTP endpoints that trigger flows:Manual Trigger
Allow users to trigger flows from the App:Operation Trigger
Trigger flows programmatically from other flows or extensions:Operations
Operations are the building blocks of flows. Chain operations together to create workflows.Condition
Branch flow based on conditions:Create Item
Create records in collections:Update Item
Modify existing records:Read Item
Fetch data from collections:Delete Item
Remove records:Send Email
Send emails with templates:HTTP Request
Call external APIs:Transform Data
Manipulate data with JSONata:Execute Script
Run custom JavaScript/TypeScript:Log Message
Write to system logs:Sleep/Delay
Pause flow execution:Throw Error
Stop flow execution with error:Send Notification
Create in-app notifications:Flow Variables
Access data within operations using template variables:$trigger
Data from the flow trigger:$last
Result from the previous operation:$accountability
Information about the user who triggered the flow:$env
Environment variables (must be allowlisted):Special Functions
{{$NOW}}- Current timestamp{{$NOW('+1 day')}}- Relative time{{$NOW('-7 days')}}- Past time
Flow Execution
Flows execute operations in order with error handling:Example Workflows
Auto-publish Scheduled Content
Sync to External CMS
Best Practices
Use Conditions for Flow Control
Use Conditions for Flow Control
Add condition operations to prevent unnecessary operations and handle edge cases.
Handle Errors Gracefully
Handle Errors Gracefully
Use reject branches to handle failures and log errors for debugging.
Limit Email Operations
Limit Email Operations
Email operations are rate-limited. Use conditions to prevent spam.
Use Async Webhooks for Long Operations
Use Async Webhooks for Long Operations
Set
async: true on webhook triggers that perform time-consuming tasks.