ElectroNeek Documentation

How-tos: AI Workflows


How to add a human approval step to an AI Workflow

Description

Some automations need a person to review or decide before they continue. For example, an invoice above a certain amount must be approved by a manager before it's paid.

In this article, you will learn how to pause an AI Workflow until a person fills in a Form, and then use their answers in the next steps. The example builds an invoice approval, but the same steps work for any review, approval or data-entry task.

Prerequisites

  • The AI Workflows and Forms permissions in AI Agent Management, to build the flow and the Form. See User Access Management.
  • The person who will approve must have the Tasks permission, so they can see and complete the Task.

Instructions

1. Create the approval Form

  1. Go to AI Agent Management > Forms and click Create. Name it, for example, "Invoice approval".
  2. Add a text element that shows the invoice data using dynamic variables, for example: Vendor: ##vendor##. Amount: ##amount## USD.
  3. Add a Dropdown question with the Name decision and two choices: Approve and Reject.
  4. Add a Text Input (Paragraph) question with the Name comments for the approver's notes.
  5. Click Save.
🚧

The Name of each question is the key you'll use to read the answer later in the flow. Use unique names without spaces.

See Add dynamic data to your form for everything dynamic variables can do.

2. Assign the Form in your flow

  1. Open your AI Workflow and add a step after the one that gets the invoice data.
  2. Choose the ElectroNeek piece and the Assign Form action.
  3. In Form, select "Invoice approval".
  4. In Inputs, add two items: vendor and amount. Map each value from the earlier step with the Data Selector.
  5. In Assign Responsible, select the approver.

When the flow runs, the approver receives an email and finds the new Task in their Tasks section, with the invoice data already filled in.

3. Wait for the answer

  1. Add the Wait for Task action from the ElectroNeek piece.
  2. In Task ID, map the Task ID returned by Assign Form.
  3. Optionally, set a Timeout so the flow doesn't wait forever if nobody answers.

The flow pauses here until the approver submits the Form.

4. Act on the decision

  1. Add a Router step after Wait for Task.
  2. Create a branch whose condition checks that decision from the Wait for Task output equals Approve, and add the steps that should run for approved invoices, such as launching an RPA bot with Run RPA Workflow.
  3. Use the other branch for rejected invoices, for example to send the comments back to the requester.

5. Test it

  1. Publish the flow and trigger it with a sample invoice.
  2. As the approver, open AI Agent Management > Tasks, click the new Task, choose a decision and submit it.
  3. Go back to the flow's run in Runs. The Wait for Task step shows the answers, and the flow continues on the matching branch.

⬅️ Back to the table

Updated