Triggers

Triggers determine when your workflows start executing. Every workflow must have at least one trigger defined.

A trigger is an event or condition that initiates a workflow. Without a trigger, a workflow remains dormant. Triggers connect workflows to real-world signals, schedules, or user actions.

Triggers also provide initial context to the workflow. For example, a workflow triggered by an alert carries the alert's metadata, entities, and source events. This context shapes how the workflow executes.

To understand whose privileges authorize a triggered run, refer to Workflow authorization.

The following types of triggers are available:

Manual triggers run workflows on-demand through the UI or API. They require explicit user action to start the workflow.

Use manual triggers for:

  • Testing and development
  • One-off data processing tasks
  • Administrative actions
  • Workflows that require a human decision to start

Manual trigger example:

triggers:
  - type: manual
		

Refer to Manual triggers for more information.

Scheduled triggers run workflows automatically at specific times or intervals. You can configure schedules using:

  • Intervals: Run every x minutes, hours, or days
  • RRule expressions: Run at specific times (for example, daily at 2 AM)

Use scheduled triggers for:

  • Daily reports
  • Regular data cleanup
  • Periodic health checks
  • Scheduled data synchronization

Scheduled trigger example:

triggers:
  - type: scheduled
    with:
      every: 5m
		

Refer to Scheduled triggers for more information.

Alert triggers run workflows automatically when a detection or alerting rule generates an alert. The workflow receives the full alert context, including all fields and values.

Use alert triggers for:

  • Alert enrichment and triage
  • Automated incident response
  • Case creation and assignment
  • Notification routing based on alert severity

Alert trigger example:

triggers:
  - type: alert
		

Refer to Alert triggers for more information.

Event-driven triggers run workflows automatically when something changes in Kibana, such as a workflow run failing or a case status changing. For example:

triggers:
  - type: workflows.failed
		

Refer to Event-driven triggers for more information.

Use the trigger that matches the activity you want to automate:

  • Handle workflow failures centrally: Use the workflow failure trigger to build one error handler that pages on-call, opens a case, or logs the failure when a production workflow fails.
  • Keep up with case activity: Use a cases trigger to act when someone creates or updates a case, such as notifying the assignee when someone adds a comment.
  • React to entity risk: Use an entity store trigger to act when an entity's risk score crosses a threshold or its asset criticality changes.
  • Respond to triage in Elastic Security: Use an Elastic Security trigger to act on triage changes, such as creating a case when someone acknowledges an attack.
  • Follow up on alert triage in Kibana Universal Alerting: Use an alert lifecycle trigger for a one-time action after someone triages an alert, such as opening a ticket when someone assigns it or posting a message when someone resolves it.
  • Track rule changes in Universal Alerting: Use a rule lifecycle trigger to audit rule management actions, sync your rule inventory with an external system, or notify a channel when someone changes a rule.
  • React to Elastic Agent Builder conversation changes: Use an Elastic Agent Builder trigger to act when a conversation changes, such as sharing a dashboard with your team when an agent attaches it to a conversation.

Each trigger type provides different data to the workflow context through the event field:

  • Manual: User information and any parameters passed.

  • Scheduled: Execution time and schedule information.

  • Alert: Complete alert data including fields, severity, and rule information.

  • Event-driven:

    • workflows.failed provides metadata about the failed workflow, its execution, and the step that failed.
    • Cases triggers provide event.caseId, event.owner, and event-specific fields (status changes carry previousStatus and status; attachment events carry IDs and type; comment events carry IDs).
    • Entity store triggers provide event.entityId, event.entityType, and event-specific fields (asset criticality changes carry criticalityLevel; risk score changes carry score, previousScore, delta, and direction).
    • Elastic Security alert and attack triggers provide event.alertIds or event.attackIds, event.truncated, and event-specific fields (status changes carry status and previousStatuses; tag changes carry tagsAdded and tagsRemoved; assignee changes carry assigneesAdded and assigneesRemoved). Elastic Security note triggers provide event.noteId, event.documentId, and event.createdBy or event.updatedBy.
    • Alert lifecycle triggers in Universal Alerting provide event.alertId, event.ruleId, and event.spaceId.
    • Rule lifecycle triggers in Universal Alerting provide event.rule.ruleId, event.rule.spaceId, and event.rule.tags.
    • Elastic Agent Builder triggers provide event.conversationId and event-specific fields. Attachment triggers also provide event.attachmentId, event.attachmentType, and event.source.

    Refer to Event-driven triggers for the full payload shapes.

Access trigger data in your workflow using template variables:

steps:
  - name: logTriggerInfo
    type: console
    with:
      message: "Workflow started at {{ execution.startedAt }}"
      details: "Event data: {{ event | json:2 }}"