﻿---
title: Triggers
description: Learn about workflow triggers and how to create and configure them.
url: https://www.elastic.co/elastic/docs-builder/docs/5113/explore-analyze/workflows/triggers
products:
  - Elastic Cloud Enterprise
  - Elastic Cloud Hosted
  - Elastic Cloud Serverless
  - Elastic Cloud on Kubernetes
  - Elastic Documentation
  - Elastic Stack
  - Kibana
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available since 9.4, Preview in 9.3
---

# 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](https://www.elastic.co/elastic/docs-builder/docs/5113/explore-analyze/workflows/authorization).

## Trigger types

The following types of triggers are available:
- [Manual triggers](#manual-triggers)
- [Scheduled triggers](#scheduled-triggers)
- [Alert triggers](#alert-triggers)
- [Event-driven triggers](#event-driven-triggers)


### Manual triggers

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:
```yaml
triggers:
  - type: manual
```

Refer to [Manual triggers](https://www.elastic.co/elastic/docs-builder/docs/5113/explore-analyze/workflows/triggers/manual-triggers) for more information.

### Scheduled triggers

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:
```yaml
triggers:
  - type: scheduled
    with:
      every: 5m
```

Refer to [Scheduled triggers](https://www.elastic.co/elastic/docs-builder/docs/5113/explore-analyze/workflows/triggers/scheduled-triggers) for more information.

### Alert triggers

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:
```yaml
triggers:
  - type: alert
```

Refer to [Alert triggers](https://www.elastic.co/elastic/docs-builder/docs/5113/explore-analyze/workflows/triggers/alert-triggers) for more information.

### Event-driven triggers

<applies-to>
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available since 9.5
  - Elastic Stack: Preview in 9.4
</applies-to>

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

Refer to [Event-driven triggers](https://www.elastic.co/elastic/docs-builder/docs/5113/explore-analyze/workflows/triggers/event-driven-triggers) for more information.

#### Common uses for event-driven triggers

Use the trigger that matches the activity you want to automate:
- **Handle workflow failures centrally**: Use the [workflow failure trigger](/elastic/docs-builder/docs/5113/explore-analyze/workflows/triggers/event-driven-triggers#workflow-failure-trigger) to build one error handler that pages on-call, opens a case, or logs the failure when a production workflow fails.
- <applies-to>Elastic Cloud Serverless: Preview</applies-to> <applies-to>Elastic Stack: Preview since 9.5</applies-to> **Keep up with case activity**: Use a [cases trigger](/elastic/docs-builder/docs/5113/explore-analyze/workflows/triggers/event-driven-triggers#cases-triggers) to act when someone creates or updates a case, such as notifying the assignee when someone adds a comment.
- <applies-to>Serverless Security projects: Preview</applies-to> <applies-to>Elastic Stack: Preview since 9.5</applies-to> **React to entity risk**: Use an [entity store trigger](/elastic/docs-builder/docs/5113/explore-analyze/workflows/triggers/event-driven-triggers#entity-store-triggers-event-driven) to act when an entity's risk score crosses a threshold or its asset criticality changes.
- <applies-to>Serverless Security projects: Preview</applies-to> <applies-to>Elastic Stack: Planned</applies-to> **Respond to triage in Elastic Security**: Use an [Elastic Security trigger](/elastic/docs-builder/docs/5113/explore-analyze/workflows/triggers/event-driven-triggers#security-triggers-event-driven) to act on triage changes, such as creating a case when someone acknowledges an attack.
- <applies-to>Serverless Observability projects: Preview</applies-to> <applies-to>Elastic Stack: Planned</applies-to> **Follow up on alert triage in Kibana Universal Alerting**: Use an [alert lifecycle trigger](/elastic/docs-builder/docs/5113/explore-analyze/workflows/triggers/event-driven-triggers#alert-episode-lifecycle-triggers-event-driven) 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.
- <applies-to>Serverless Observability projects: Preview</applies-to> <applies-to>Elastic Stack: Planned</applies-to> **Track rule changes in Universal Alerting**: Use a [rule lifecycle trigger](/elastic/docs-builder/docs/5113/explore-analyze/workflows/triggers/event-driven-triggers#alerting-rule-lifecycle-triggers-event-driven) to audit rule management actions, sync your rule inventory with an external system, or notify a channel when someone changes a rule.
- <applies-to>Elastic Cloud Serverless: Preview</applies-to> <applies-to>Elastic Stack: Planned</applies-to> **React to Elastic Agent Builder conversation changes**: Use an [Elastic Agent Builder trigger](/elastic/docs-builder/docs/5113/explore-analyze/workflows/triggers/event-driven-triggers#agent-builder-triggers) to act when a conversation changes, such as sharing a dashboard with your team when an agent attaches it to a conversation.


## Trigger context

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).
  - <applies-to>Serverless Security projects: Preview</applies-to> <applies-to>Elastic Stack: Preview since 9.5</applies-to> 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`).
  - <applies-to>Serverless Security projects: Preview</applies-to> <applies-to>Elastic Stack: Planned</applies-to> 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`.
  - <applies-to>Serverless Observability projects: Preview</applies-to> <applies-to>Elastic Stack: Planned</applies-to> Alert lifecycle triggers in Universal Alerting provide `event.alertId`, `event.ruleId`, and `event.spaceId`.
  - <applies-to>Serverless Observability projects: Preview</applies-to> <applies-to>Elastic Stack: Planned</applies-to> Rule lifecycle triggers in Universal Alerting provide `event.rule.ruleId`, `event.rule.spaceId`, and `event.rule.tags`.
  - <applies-to>Elastic Cloud Serverless: Preview</applies-to> <applies-to>Elastic Stack: Planned</applies-to> 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](https://www.elastic.co/elastic/docs-builder/docs/5113/explore-analyze/workflows/triggers/event-driven-triggers) for the full payload shapes.

Access trigger data in your workflow using template variables:
```yaml
steps:
  - name: logTriggerInfo
    type: console
    with:
      message: "Workflow started at {{ execution.startedAt }}"
      details: "Event data: {{ event | json:2 }}"
```