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

# Workflows Overview

> Build, configure, test, and activate multi-step automations with triggers, steps, and expressions.

Posttu Workflows let you automate complex multi-platform processes, content aggregation, AI content generation, and team approval flows.

> [card] [Building Workflows Guide](https://docs.posttu.com/guides/building-workflows.md)
>
> Looking for a complete step-by-step walkthrough? Read our end-to-end guide on constructing, testing, publishing, and activating automated pipelines via API and AI Copilot.

## Core Concepts

* **Workflow**: The container entity (`id`, `name`, `description`, `isActive`).
* **Draft Version**: The active workspace where you configure triggers and add/edit steps.
* **Trigger**: The node that initiates execution (Schedule, Webhook, RSS, App Event).
* **Steps**: Ordered action nodes (`ai_*`, `channel_post`, `http_request`, `condition`, `loop`, etc.).
* **Expressions**: Dynamic `{{...}}` tags for mapping data between nodes.
* **Runs**: Execution traces with per-step logs, timing, inputs, and outputs.

## Workflow Execution State Machine

```mermaid theme={null}
stateDiagram-v2
    [*] --> Draft: POST /api/v1/workflow
    Draft --> Published: POST /api/v1/workflow/{id}/publish
    Published --> Active: POST /api/v1/workflow/{id}/active (isActive: true)
    Active --> Paused: POST /api/v1/workflow/{id}/active (isActive: false)
    Paused --> Active: POST /api/v1/workflow/{id}/active (isActive: true)
    Active --> Running: Event / Cron Trigger Fires
    Running --> Success: All Steps Complete
    Running --> Failed: Step Error / Exception
    Running --> Cancelled: POST /api/v1/workflow/runs/{runId}/cancel
```

## Quick Reference API Endpoints

| Endpoint | Method | Purpose |
| - | - | - |
| `/api/v1/workflow` | GET | List organization workflows |
| `/api/v1/workflow` | POST | Create a new workflow container |
| `/api/v1/workflow/{id}` | GET | Retrieve workflow details & draft graph |
| `/api/v1/workflow/{id}` | PATCH | Update workflow metadata or canvas |
| `/api/v1/workflow/{id}` | DELETE | Delete workflow and run history |
| `/api/v1/workflow/{id}/trigger` | POST | Configure main starter trigger |
| `/api/v1/workflow/{id}/step` | POST | Add or update a step node (supports branches & ordering) |
| `/api/v1/workflow/{id}/step/{stepId}` | DELETE | Delete a step node |
| `/api/v1/workflow/{id}/publish` | POST | Publish draft to an immutable release version |
| `/api/v1/workflow/{id}/active` | POST | Pause or activate production runs |
| `/api/v1/workflow/{id}/webhook` | GET | Retrieve inbound webhook URL for webhook triggers |
| `/api/v1/workflow/{id}/test` | POST | Run test execution against draft |
| `/api/v1/workflow/{id}/runs` | GET | List execution history logs |
| `/api/v1/workflow/runs/{runId}` | GET | View per-step execution details & logs |
| `/api/v1/workflow/runs/{runId}/cancel` | POST | Cancel an active in-flight run |
| `/api/v1/workflow/pieces` | GET | Search and list available integrations & pieces |
| `/api/v1/workflow/pieces/{pieceName}` | GET | Inspect single piece actions, triggers & properties |
| `/api/v1/workflow/connections` | GET | List connected third-party accounts for integrations |

## Next steps

> [card] [Building Workflows Guide](https://docs.posttu.com/guides/building-workflows.md)
>
> Follow the complete 6-step lifecycle for building, testing, publishing, and activating workflows.

> [card] [List Pieces & Actions](https://docs.posttu.com/api-reference/workflow/list-pieces.md)
>
> Explore the full catalog of triggers, actions, and third-party integrations available in Posttu.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.