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

# Workflows & automations

> How gu1 workflows work—triggers, conditions, actions, standby, and creating flows in the product or via API. See request schema, response codes.

## What Is a Workflow?

In gu1, **workflows** are **automations**: **WHEN** \[something happens] → **IF** \[optional conditions] → **THEN** \[run actions]. They are configured in the app (**Automations** / Workflow Builder) or created and updated through the [Workflows API](/en/api-reference/automations/list-automations) (see **API Reference** in the sidebar).

<Info>
  Workflows here are **not** the same as **AML rules** (rules engine). Rules have their own triggers and actions. A rule can **start a workflow** via the “when rule matches” trigger.
</Info>

## Guide (Concepts)

| Topic                                                    | Description                                                                  |
| -------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [Triggers](/en/workflows/triggers)                       | Every `triggerType`, filters, and condition contexts.                        |
| [Actions](/en/workflows/actions)                         | All automation engine actions and what they read/write in `event.data`.      |
| [Synergy](/en/workflows/synergy)                         | Which triggers allow which actions, and valid action → next-action pairs.    |
| [Context and standby](/en/workflows/context-and-standby) | Shared context, resume refresh, standby limits, KYC patterns, template URLs. |
| [Building flows](/en/workflows/building-flows)           | Graph vs steps, branching, fan-out, save validation, test vs run.            |
| [Rules and workflows](/en/workflows/rules-and-workflows) | How AML rules invoke automations (`rule_triggered`).                         |

## Execution Modes (Summary)

| Mode               | Description                                                                                                                                                                                  |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Graph**          | Visual flow: trigger → condition nodes (Yes/No branches) → action nodes. If the automation has a valid `graph` (nodes + edges and at least one trigger node), the engine runs the **graph**. |
| **Steps (legacy)** | Ordered blocks: each block has conditions + actions. If conditions fail, that **entire block** is skipped.                                                                                   |

If both exist, **graph takes priority** over a flat `steps` / `actions` list.

* Condition nodes: wire **both** true and false outputs for a real IF/ELSE.
* Multiple edges from one **action** node: the engine runs **all** branches **in sequence** (fan-out), not “pick one.”

## Standby (Short)

**Standby** pauses **one execution** until continue or cancel. It only works when the run uses **`runAutomationById`** (e.g. **`POST /automations/:id/run`** with **Manual execution**, rules, scheduler). Purely reactive events (`processEvent`) do **not** create a durable execution: **wait does not pause** on that path.

See [Context and standby](/en/workflows/context-and-standby) and the API: [Continue execution](/en/api-reference/automations/continue-execution), [Cancel execution](/en/api-reference/automations/cancel-execution).

## Creating a Workflow (Product UI)

1. **Automations** → **New automation** → pick a **trigger** and optional filters.
2. Build **conditions** and **actions** (graph or steps).
3. Save. The API validates **synergy** and graph shape (see [Synergy](/en/workflows/synergy)).

## Testing vs. Production Runs

* **`POST /automations/:id/execute`** — **Test** run: synthetic event, **`processEvent`**, no standby.
* **`POST /automations/:id/run`** — **Production-style** for **`manual_execution`**: **`runAutomationById`**; standby and `waiting` apply when configured.

## Related Documentation

* **API Reference** (sidebar) — endpoints under `/automations`, starting with [List automations](/en/api-reference/automations/list-automations).
