> For the complete documentation index, see [llms.txt](https://docs.lleverage.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lleverage.ai/build-and-improve/automate/build-a-workflow.md).

# Build a workflow

A Workflow is a defined execution path for recurring operational work.

## Orient yourself in the editor

The centre of the editor is the canvas. Each action appears as a card, and the connecting line between cards shows the execution path. The Workflow selector and version indicator sit above the canvas.

**Run**, **Feedback**, **Test** and **Publish** are four tabs of the same right-hand lifecycle panel. Run executes the current Draft; Feedback records feedback on a run; Test opens the Workflow test panel, headed **Evaluations** in the current UI; Publish manages versions and live publication state.

![A current Workflow editor with the canvas, header lifecycle tabs, validation state and bottom canvas controls visible.](https://3370306531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlgSglJDQZxDZdn20CUcl%2Fuploads%2FyxunZXAjjwyF3rzwknFU%2Fworkflow-editor-canvas.png?alt=media)

The bottom canvas bar contains navigation and layout controls plus **Add Action**. The minimap is a separate floating panel when the Workflow extends beyond the current viewport.

Use the dedicated [Canvas reference](/build-and-improve/automate/build-a-workflow/canvas-reference.md) pages for those editor mechanics.

## Design before you wire

Before placing actions, define:

* **Trigger** — what event creates the work?
* **Outcome** — what should be true when the Workflow is complete?
* **Inputs** — what information does it need, and which source is authoritative?
* **Logic** — which decisions can be encoded directly?
* **Data flow** — what must each step receive from earlier steps?
* **Human boundary** — where should execution stop and ask a person through a configured Request?
* **Failure behaviour** — should a failure stop, explicitly retry, or continue with an error state?

## Read the visual path as execution

The canvas is not just a diagram. Connected actions represent the route the Workflow can execute. Keep the main path readable, use explicit flow-control actions where paths diverge, and avoid relying on layout alone to communicate business logic.

Descriptions on cards help explain what each step is intended to do. The underlying configuration and data bindings are what determine execution.

## Test with production consequences in mind

When the draft is ready, use **Run** or the Test surface to exercise it. These are real Workflow executions and can call external systems, send messages or make writes. They are not automatically side-effect-free sandboxes.

When behaviour is correct, use [Test and publish](/build-and-improve/automate/test-and-publish.md) to understand Draft → Published behaviour and the live active/default path.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lleverage.ai/build-and-improve/automate/build-a-workflow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
