Triggers
Workflow Triggers
Triggers determine when a workflow runs. AI for Database supports several trigger types for different use cases.
Scheduled Triggers
Run workflows on a time-based schedule. Uses cron syntax under the hood but provides a friendly UI.
Preset schedules:
- Every 5 minutes
- Every 15 minutes
- Every hour
- Every day at a specific time
- Every week on a specific day
- Every month on a specific date
Custom cron: For advanced scheduling, enter a cron expression directly (e.g., 0 9 * * 1-5 for weekdays at 9 AM).
Timezone: All schedules run in your configured timezone (set in Settings > Preferences).
Webhook Triggers
Each workflow with a webhook trigger gets a unique URL:
https://app.aifordatabase.com/api/webhooks/wf_abc123Send a POST request to this URL to trigger the workflow. The request body is available as a variable in query steps:
{
"customer_id": "cust_456",
"event": "subscription_cancelled"
}Access these values in queries with {{webhook.customer_id}}.
Security: Webhook URLs include a unique token. You can also configure HMAC signature verification for additional security.
Manual Triggers
Manual workflows only run when you click Run in the UI or call the API. Useful for ad-hoc tasks like generating a report on demand.
Trigger History
Every trigger event is logged with its timestamp, source, and whether the workflow executed successfully. View the log in the Runs tab of each workflow.