> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gu1.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Triggers

> All workflow trigger types, optional filters (triggerConfig), and typical event context — in the gu1 workflow automation engine with triggers and actions.

Every automation has exactly one **`triggerType`**. When a matching event occurs (or a schedule fires, or the API runs the workflow), the engine starts an execution with **`event.data`** populated from that source.

<Info>
  **Source of truth:** trigger types are stored in the API (`VALID_TRIGGER_TYPES` in the automations schema). The UI lists the same values with labels and filters in the Workflow Builder.
</Info>

## Trigger Catalog

| `triggerType`                  | Business meaning                                                                                                           | Typical filters (`triggerConfig`)                                                                                    |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `alert_created`                | An alert was created for an entity.                                                                                        | Optional: `severities`, `categories`, `delaySeconds` (delay before running, up to a typical cap).                    |
| `investigation_created`        | A case/investigation was opened.                                                                                           | —                                                                                                                    |
| `investigation_status_changed` | Investigation status changed.                                                                                              | —                                                                                                                    |
| `investigation_updated`        | Investigation was updated (e.g. consolidated alerts).                                                                      | —                                                                                                                    |
| `entity_created`               | A person or company was created.                                                                                           | `entityTypes`, `countryCodes`, optional `automaticFlow` (tax-id auto flow where supported).                          |
| `create_entity_flow`           | Guided onboarding flow by `workflowId` (not a live “system event” like the others).                                        | `entityTypes`, `countryCodes`, optional re-enrichment flags. Invoked via `runAutomationById` from the creation flow. |
| `transaction_created`          | A transaction was created or updated in a way that emits the event.                                                        | —                                                                                                                    |
| `rule_triggered`               | An AML rule matched and chose to **start this automation** (see [Rules and workflows](/en/workflows/rules-and-workflows)). | —                                                                                                                    |
| `kyc_approved`                 | KYC validation finished with approval.                                                                                     | —                                                                                                                    |
| `kyc_rejected`                 | KYC validation finished with rejection.                                                                                    | —                                                                                                                    |
| `kyc_validation_finished`      | KYC validation finished (approved or rejected).                                                                            | —                                                                                                                    |
| `manual_execution`             | Someone calls **`POST /automations/:id/run`** with a payload.                                                              | —                                                                                                                    |
| `scheduled`                    | Scheduler runs the automation on a cadence (daily/weekly/monthly, test intervals, etc.).                                   | `frequency`, `hour`, `minute`, `timezone`, `dayOfWeek`, `dayOfMonth`, optional `intervalMinutes` in the product.     |

## Who Emits Which Trigger?

* **Reactive events** (alert, investigation, entity, transaction, KYC): the corresponding services emit the event to the automation engine (`processEvent`).
* **`rule_triggered`:** synthetic event when a rule action runs the automation.
* **`manual_execution`:** only when you call **`run`** with an automation whose trigger is manual.
* **`scheduled`:** the automations scheduler process.
* **`create_entity_flow`:** entity creation / onboarding path calling **`runAutomationById`** with the right workflow id.

## Condition Contexts per Trigger

The product only shows **condition fields** that make sense for the trigger you picked. The UI maps each trigger to allowed contexts (transaction, investigation, alert, entity, KYC, rule):

| Trigger                        | Contexts with data (typical)                                          |
| ------------------------------ | --------------------------------------------------------------------- |
| `rule_triggered`               | Rule, transaction, entity, alert, KYC                                 |
| `alert_created`                | Alert, entity                                                         |
| `investigation_created`        | Investigation, entity                                                 |
| `investigation_status_changed` | Investigation, entity                                                 |
| `investigation_updated`        | Investigation, entity                                                 |
| `entity_created`               | Entity, KYC                                                           |
| `create_entity_flow`           | Entity, KYC                                                           |
| `transaction_created`          | Transaction, entity                                                   |
| `kyc_approved`                 | Entity, KYC                                                           |
| `kyc_rejected`                 | Entity, KYC                                                           |
| `kyc_validation_finished`      | Entity, KYC                                                           |
| `manual_execution`             | Transaction, investigation, alert, entity, KYC (depending on payload) |
| `scheduled`                    | Entity (payload is usually narrow)                                    |

See also [Context and standby](/en/workflows/context-and-standby) for how `event.data` is shaped.

## Notes

* **Disabled or archived** automations do not run.
* **KYC:** `kyc_approved` / `kyc_rejected` / `kyc_validation_finished` may overlap in policy; design automations so you do not double-run the same business logic unless intended.

***

**Maintenance:** When the product adds a trigger, update this page and the synergy tables in [Synergy](/en/workflows/synergy).
