Skip to main content

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

  1. Navigate to Automations in the dashboard
  2. Click Create Automation
  3. In the Trigger section, choose:
    • Event-based: Run when a billing event occurs
    • Schedule-based: Run at specific times
  4. Configure trigger settings
  5. Add actions and conditions
  6. Click Save

Event Triggers

Event triggers fire when specific actions occur in your billing system.

Available Events

Subscription Events

EventDescription
subscription.activatedSubscription became active
subscription.startedSubscription started
subscription.cancelation_scheduledCancellation scheduled for future date
subscription.canceledSubscription canceled

Invoice Events

EventDescription
invoice.issuedInvoice issued to customer
invoice.paidInvoice fully paid

Payment Events

EventDescription
payment.createdPayment initiated
payment.updatedPayment status changed

Other Events

EventDescription
checkout.session.completedCheckout completed successfully
refund.updatedRefund status changed
account.credits.grantedCredits manually granted to customer
account.credits.balance_depletedCredit balance reached zero
line_item.deletedInvoice line item deleted

Configuring Event Triggers

  1. Select Event-based trigger
  2. Choose the event type from the dropdown
  3. Optionally add filters to narrow which events trigger the automation

Filters

Filter which events trigger the automation:
FilterDescriptionExample
Invoice amountFilter by invoice totalGreater than $1,000
Customer segmentFilter by customer segmentEnterprise customers
PlanFilter by subscription planPro plan only

Schedule Triggers

Schedule triggers run automations at specified times.

Interval-Based

Run at regular intervals:
IntervalDescription
Every 5 minutesHigh-frequency checks
Every hourRegular monitoring
Every dayDaily reports
Every weekWeekly summaries

Cron-Based

Use cron expressions for precise scheduling:
ExpressionDescription
0 9 * * *Daily at 9 AM
0 9 * * 1Mondays at 9 AM
0 0 1 * *First of month at midnight
0 */6 * * *Every 6 hours
0 9 * * 1-5Weekdays at 9 AM
Cron format: minute hour day-of-month month day-of-week

Calendar-Based

Human-readable calendar triggers:
OptionDescription
First of monthFirst day of each month
Last of monthLast day of each month
Specific dayA specific day (e.g., 15th)
WeekdayMonday, 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

  1. Trigger: invoice.issued
  2. Action: Send email to customer with invoice details

Update CRM on Subscription Activated

  1. Trigger: subscription.activated
  2. Action: Send webhook to CRM with subscription details

Weekly Revenue Report

  1. Trigger: Schedule - Every Monday at 9 AM
  2. Action: Send report email to finance team

Notify Sales on Large Payment

  1. Trigger: payment.created
  2. Filter: Amount > $10,000
  3. 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

  1. Navigate to Automations → [Automation Name]
  2. Click the History tab
  3. View recent executions:
    • Trigger event/schedule
    • Execution status
    • Timestamp
    • Actions performed

Troubleshooting

Trigger Not Firing

  1. Verify the automation is Active
  2. Check that the event type matches exactly
  3. Review filters - they may be too restrictive
  4. Confirm the event is actually occurring in your account

Automation Runs Too Often

  1. Add filters to narrow the trigger conditions
  2. Consider using debouncing for rapid-fire events
  3. Review if multiple automations overlap

Schedule Not Running

  1. Verify the cron expression is correct
  2. Check timezone settings
  3. Confirm the automation is active

Next Steps