> ## 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.

# Rules and workflows

> How AML rules relate to automations and the rule_triggered trigger — in the gu1 workflow automation engine with triggers and actions.

## Two Different Systems

| Layer                        | Role                                                                                                                                                                                   |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **AML rules (rules engine)** | Evaluate transactions, entities, or other subjects; conditions and **rule actions** are defined in the rule builder (scores, alerts, `trigger_workflow` / `trigger_automation`, etc.). |
| **Automations (workflows)**  | **This documentation:** triggers like `alert_created`, `transaction_created`, **`rule_triggered`**, actions like `create_investigation`, `run_risk_matrix`, `send_webhook`, etc.       |

They are **not** the same product surface, but they **integrate**.

## Bridge: Rule → Automation

When a rule **matches**, a rule action can **start one or more automations**. The automation then runs with **`triggerType: `**`rule_triggered` and `event.data` populated with:

* **Rule summary:** e.g. `rule.id`, `rule.name`, `rule.externalId`, `rule.score`.
* **Evaluated subject context:** typically **entity**, **transaction**, and optionally **alert** / **KYC**, depending on what the rule evaluated.

Use this to chain **rule decisions** into **case management**, **notifications**, or **enrichment** workflows without duplicating all rule logic inside the automation.

## Designing `rule_triggered` Automations

* Prefer actions allowed for **`rule_triggered`** in [Synergy](/en/workflows/synergy) (e.g. `create_investigation`, `set_entity_status`, `run_risk_matrix`, `create_kyc_validation`, webhooks).
* Conditions can use the **rule** context (see [Triggers](/en/workflows/triggers)).

## Where to Read About Rules

Rule-specific triggers, scores, and rule actions are documented in the **Rules** sections of this site, not duplicated here.

***

**Maintenance:** Rule action names and parameters live in the rules engine and API routes; automation side is `runAutomationById` + synthetic `rule_triggered` event.
