Automation Triggers
Triggers define when an automation runs. Alguna supports event-based triggers that respond to billing events and schedule-based triggers for time-based workflows.Configuring Triggers
Create an Automation with Triggers
- Navigate to Automations in the dashboard
- Click Create Automation
- In the Trigger section, choose:
- Event-based: Run when a billing event occurs
- Schedule-based: Run at specific times
- Configure trigger settings
- Add actions and conditions
- Click Save
Event Triggers
Event triggers fire when specific actions occur in your billing system.Available Events
Subscription Events
| Event | Description |
|---|---|
subscription.activated | Subscription became active |
subscription.started | Subscription started |
subscription.cancelation_scheduled | Cancellation scheduled for future date |
subscription.canceled | Subscription canceled |
Invoice Events
| Event | Description |
|---|---|
invoice.issued | Invoice issued to customer |
invoice.paid | Invoice fully paid |
Payment Events
| Event | Description |
|---|---|
payment.created | Payment initiated |
payment.updated | Payment status changed |
Other Events
| Event | Description |
|---|---|
checkout.session.completed | Checkout completed successfully |
refund.updated | Refund status changed |
account.credits.granted | Credits manually granted to customer |
account.credits.balance_depleted | Credit balance reached zero |
line_item.deleted | Invoice line item deleted |
Configuring Event Triggers
- Select Event-based trigger
- Choose the event type from the dropdown
- Optionally add filters to narrow which events trigger the automation
Filters
Filter which events trigger the automation:| Filter | Description | Example |
|---|---|---|
| Invoice amount | Filter by invoice total | Greater than $1,000 |
| Customer segment | Filter by customer segment | Enterprise customers |
| Plan | Filter by subscription plan | Pro plan only |
Schedule Triggers
Schedule triggers run automations at specified times.Interval-Based
Run at regular intervals:| Interval | Description |
|---|---|
| Every 5 minutes | High-frequency checks |
| Every hour | Regular monitoring |
| Every day | Daily reports |
| Every week | Weekly summaries |
Cron-Based
Use cron expressions for precise scheduling:| Expression | Description |
|---|---|
0 9 * * * | Daily at 9 AM |
0 9 * * 1 | Mondays at 9 AM |
0 0 1 * * | First of month at midnight |
0 */6 * * * | Every 6 hours |
0 9 * * 1-5 | Weekdays at 9 AM |
minute hour day-of-month month day-of-week
Calendar-Based
Human-readable calendar triggers:| Option | Description |
|---|---|
| First of month | First day of each month |
| Last of month | Last day of each month |
| Specific day | A specific day (e.g., 15th) |
| Weekday | Monday, Tuesday, etc. |
Trigger Context
Each trigger provides context data accessible in automation steps:Event Trigger Context
When an event triggers the automation, you can access:- Event type and timestamp
- Related object data (invoice, subscription, payment, etc.)
- Customer information
- Associated metadata
Schedule Trigger Context
For scheduled triggers:- Scheduled run time
- Actual run time
- Run number (for tracking)
Common Trigger Patterns
Send Reminder on Invoice Issued
- Trigger:
invoice.issued - Action: Send email to customer with invoice details
Update CRM on Subscription Activated
- Trigger:
subscription.activated - Action: Send webhook to CRM with subscription details
Weekly Revenue Report
- Trigger: Schedule - Every Monday at 9 AM
- Action: Send report email to finance team
Notify Sales on Large Payment
- Trigger:
payment.created - Filter: Amount > $10,000
- Action: Send Slack notification to sales channel
Best Practices
Use Filters
Filter events to avoid unnecessary executions.
Test First
Test automations in sandbox before activating in production.
Consider Timing
Schedule triggers at appropriate times for your audience.
Monitor Executions
Review automation logs to ensure triggers fire as expected.
Viewing Trigger History
- Navigate to Automations → [Automation Name]
- Click the History tab
- View recent executions:
- Trigger event/schedule
- Execution status
- Timestamp
- Actions performed
Troubleshooting
Trigger Not Firing
- Verify the automation is Active
- Check that the event type matches exactly
- Review filters - they may be too restrictive
- Confirm the event is actually occurring in your account
Automation Runs Too Often
- Add filters to narrow the trigger conditions
- Consider using debouncing for rapid-fire events
- Review if multiple automations overlap
Schedule Not Running
- Verify the cron expression is correct
- Check timezone settings
- Confirm the automation is active