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

# Automate a process with approvals

> Build a small expense workflow with an approval step, run it from New task, approve it in the Inbox and read the result in Tasks.

You will build an expense approval workflow: someone enters an expense claim, a step drafts a summary for the manager, a manager approves it in the **Inbox**, and the finished run shows up in **Tasks**.

> [!NOTE]
>
> **Time:** about 20 minutes · **Role:** Member or Admin to build and run it, and a second Member or Admin to approve · **Works on:** Enterprise and SaaS. A SaaS Free plan allows 3 agents and workflows together. On a SaaS personal account you approve your own run (see stage 2) · **You need:** a colleague who will approve, ideally in a group such as "Managers" (an Admin creates groups in **Settings** › **Users & groups**)

<video controls preload="metadata" poster="/videos/first-workflow.jpg" src="https://mintcdn.com/neuralfactory/y-MI7aIFykaw0cY2/videos/first-workflow.mp4?fit=max&auto=format&n=y-MI7aIFykaw0cY2&q=85&s=1ae601b8e77e0ba5dbaab15c81013b74" />

Watch: Automate a process with approvals (1 min 46 s)

> [!NOTE]
>
> **Workflows** carries a **Beta** badge. Screens, options and defaults may still change.

## What you will have at the end

* A published expense approval workflow with an input form, a drafting step and an **Approval** step.
* One run of it, started from **New task** and approved by a colleague.
* That run in **Tasks**, with its output and the approval decision on record.

## 1. Describe the workflow and let the builder build it

**1. Open the builder**

In the sidebar, under **Workforce**, click **Workflows**, then **Build a workflow**. The page **What do you want to build?** opens with **Workflow** selected.

**2. Describe the process**

Say what the process starts from, what happens along the way and what it hands back. For this guide:

"Take an expense claim: the employee's name, the amount in euros and what it was for. Draft a short summary of the claim for the manager. Then ask someone in the Managers group to approve it. When it is approved, hand back the summary."

**3. Build**

Click **Build**. It usually takes about a minute.

**4. Look at what it built**

The steps appear on the right, beside the **Builder** pane, and the builder gives the workflow a name, for example "Expense Claim Approval". **Inputs your workflow will ask for** lists the form's fields. If there is no **Approval** step, type "Add an approval step after the summary" in **Describe changes to your workflow…** and send it.

> [!TIP]
>
> The steps on the right include one that drafts the summary and an **Approval** step after it.

## 2. Save it and check the approval step

**1. Save as a draft**

Open the menu beside **Save & publish** and choose **Save as draft**. Then click **Open it** to go to the workflow page.

**2. Open the approval step**

On the **Steps** tab, point at the card marked **Approval** and click the pencil that appears on it (**Edit step**). **Edit Step** opens.

**3. Say who approves**

* **Prompt**: what the approver is asked, for example "Check this claim against the expense policy."
* **Approver Groups**: pick "Managers". Its members and the Admins can then decide. If **Approver Role** holds text, people whose role or group name matches it can decide too. Clear it to keep the group alone. With neither set, anyone who can see the workflow can decide.
* **Timeout (hours)** and **On Timeout**: by default 24 and **Auto-reject**. Leave them.
* **Allow self-approval (governance exception)**: leave it off. Turn it on only on a SaaS personal account, where nobody else can decide.

![The Edit Step dialog of the approval step, scrolled to its configuration: the prompt Check this claim against the expense policy, an empty Approver Role, a 24-hour timeout with Auto-reject, the Managers group under Approver Groups, and self-approval switched off.](https://mintcdn.com/neuralfactory/y-MI7aIFykaw0cY2/images/app/workflow-approval-step.png?fit=max\&auto=format\&n=y-MI7aIFykaw0cY2\&q=85\&s=29ff4ff0acda53f170981a4e497ac19b)

**4. Save**

Click **Save Changes** in the dialog, then **Save** in the header.

> [!TIP]
>
> The **Save** button is gone from the header, and the header shows a **Draft** badge with the new revision number.

## 3. Share it and publish it

Approvers see a request only for workflows they can see, so share the workflow before anyone runs it.

**1. Open the sharing settings**

Click **More actions** (the ⋯ button in the header) and choose **Settings & sharing**. On a SaaS personal account it is called **Settings** and has no sharing.

**2. Choose who can see it**

* **Member**: choose **Public**, so everyone in the organization can see and run it. A private workflow of a Member is open only to them and the Admins.
* **Admin**: you can also keep it **Private** and add the people or groups who should use it, the "Managers" group included.

Click **Save**.

**3. Publish**

Click **Publish** in the header. In the dialog (titled **Publish revision r2**, for example), you can write a **Review note (optional)**, which is recorded on the audit trail. Click **Publish**.

> [!TIP]
>
> The header shows **Published** with the revision number, for example **Published r2**.

## 4. Run it from New task

**1. Pick the workflow**

Click **New task**. Open the worker selector at the bottom of the message box and pick your workflow ("Expense Claim Approval", for example) under **Workflows**. It shows its published version, for example **v2 · published**.

**2. Fill in the form**

The message box turns into the workflow's form. Enter a name, an amount such as 86 and a purpose such as "Train ticket to the Berlin client meeting". A badge below the form reads **Ready** once every required field is filled.

**3. Run**

Click the run button (the play icon), or press Ctrl+Enter (⌘+Enter on a Mac). The run's task page opens and its steps appear as they run.

> [!TIP]
>
> The run's **Status** reads **Waiting for approval**, on its task page and in **Tasks**.

## 5. Approve it in the Inbox

The approver does this stage. Whoever started a run cannot decide its approval, Admins included, unless the step allows self-approval.

**1. Open the Inbox**

The approver clicks **Inbox** in the sidebar. The number beside it counts what waits for them. The request is on the **Waiting for you** tab.

**2. Review the request**

Click the row. A panel opens with **Your approval is needed**, the step's prompt and the details of the run, such as the fields of the claim.

**3. Decide**

Write a **Comment**, which is recorded with the decision. Add **Evidence**, such as a link to the receipt, if it helps; it goes on the audit trail. Click **Approve & resume run**. A message confirms **Approved — the run has resumed**.

![The approval panel opened from the Inbox: Your approval is needed, the step's prompt, the drafted summary of an 86 euro train ticket claim, a comment and a receipt as evidence filled in, and the Approve & resume run and Reject buttons.](https://mintcdn.com/neuralfactory/y-MI7aIFykaw0cY2/images/app/workflow-approval-panel.png?fit=max\&auto=format\&n=y-MI7aIFykaw0cY2\&q=85\&s=e6cfe3c2ed4665e26badd5c7e1ac2c61)

> [!TIP]
>
> The request leaves **Waiting for you** and appears under **Decided** as **Approved**, with the approver's name and comment.

## 6. See the result in Tasks

**1. Find the run**

Click **Tasks** in the sidebar, choose **Workflows** above the list and click the run.

**2. Read it**

The **Status** is **Completed**. **Output** shows the summary the workflow handed back, as **Formatted** fields or as **JSON**. **Approvals** shows who decided, when, and their comment.

> [!TIP]
>
> The run is **Completed** and its **Approvals** section names your colleague. **Record** opens the run's sealed record in [Interactions](https://docs.neuralfactory.ai/user-guide/governance/interactions.md).

## If something goes wrong

* The approver has nothing in their **Inbox**. They see an approval only when they can see the workflow and match the step's approver group or role. Share the workflow (stage 3) and check that they are in the group. Viewers have no Inbox.
* The decision buttons are off, with a line saying you started this run and someone else must decide it. This is the four-eyes rule. Ask a colleague to decide, or cancel the run from the panel. When the buttons are off because the step needs a role you lack, hovering them names that role.
* The workflow is not in the worker selector. Only published workflows that are not archived are offered. Publish it (stage 3).
* **Build a workflow** is disabled with "Worker limit reached (agents and workflows)". Your SaaS Free plan already has 3 agents and workflows. See [Plans and limits](https://docs.neuralfactory.ai/user-guide/admin/billing.md).

When nobody decides before the timeout, the step's **On Timeout** action is applied and the request shows as **Timed out**. More messages are in [Running a workflow](https://docs.neuralfactory.ai/user-guide/workflows/running-a-workflow.md#when-a-run-does-not-start) and in [Help](https://docs.neuralfactory.ai/help/index.md).

## Where to go next

* [Building a workflow](https://docs.neuralfactory.ai/user-guide/workflows/building-a-workflow.md): every step type and approval setting.
* [Running a workflow](https://docs.neuralfactory.ai/user-guide/workflows/running-a-workflow.md): run from the workflow page, cancel a run, schedule it.
* [Inbox](https://docs.neuralfactory.ai/user-guide/inbox.md): approvals and agent questions in one list.


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