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

# Automation workflows

> Graph-based workflows that react to CRM events — triggers, steps, and approval-gated actions.

ECN includes a graph-based **automation engine** (n8n-style) for reacting to events
in your workspace: a contact is created, a deal changes stage, a form is submitted,
an owner claims a listing, and more.

## Model

| Concept        | What it is                                                                                                              |
| -------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **Workflow**   | An editable graph (`DRAFT`) that you **publish** to a frozen, executable version (`LIVE`).                              |
| **Trigger**    | What starts a workflow — e.g. `contact.created`, `deal.stage_changed`, `form.submitted`, `tag.added`, `schedule.daily`. |
| **Step**       | A node: action (`send_email`, `create_task`, `webhook_post`, `add_tag`…), wait, branch, or merge.                       |
| **Enrollment** | A per-contact run. It pins the published graph at enroll time, so later edits don't change in-flight runs.              |
| **Step run**   | The execution log for each step of an enrollment.                                                                       |

## Lifecycle

```mermaid theme={null}
flowchart LR
  D[Draft graph<br/>editable steps] -->|publish| L[Live<br/>frozen graph]
  T[Trigger fires] --> E[Enrollment<br/>pins graph]
  E --> R[Step runs<br/>execute in order]
```

## Approval-gated sends

Like the rest of ECN, any step that **sends** outbound (email, post) respects the
approval model — AI-drafted content is `seeded` and a human approves before it goes
out. See [Security](/mcp/security).

## API

Workflows are managed under `/api/v1/automation/` — list/create workflows, inspect
a workflow's graph, publish, test, and view enrollments and step runs. See the
[API reference](/api-reference/introduction).

<Note>
  Re-synced to the live system each docs iteration. The available trigger and action
  types track the backend `automation` app.
</Note>
