Manual Workflow Builder

Configure a leave approval workflow

This walkthrough builds the most common gov-app workflow:

When a staff member submits a leave application, route it to their supervisor. If approved, mark the record approved and email the applicant. If rejected, mark rejected and email a reason.

You will end up with: 1 Start, 1 Approval Task, 1 Decision, 2 Actions (emails), 2 Ends.

Before you start

You need:

  • A table for leave applications, with at least these fields: staff_id, start_date, end_date, days, status, reason.
  • A status field that uses a Dropdown type with values like submitted, approved, rejected.
  • An assignment rule for "Supervisor" — set up under Roles & Permissions → Assignment Rules.

Steps

1. Create the workflow

  1. Open Build -> Workflows and click New workflow.
  2. Name it Leave approval.
  3. Pick the table — Leave Applications.
  4. Trigger eventrecord.status_changed.
  5. Trigger fieldstatus.
  6. Trigger configfrom: any, to: submitted. The workflow now only runs when an application becomes submitted.

2. Add the Start node

The Start node is created automatically. Leave it as-is.

3. Add the Approval Task

  1. Drag in an Approval Task node. Label it Supervisor review.
  2. Assignee: pick the Supervisor assignment rule.
  3. Approve outcome: name it approved.
  4. Reject outcome: name it rejected.
  5. Connect the Start node → Supervisor review.

4. Add a Decision after the Approval

The Approval Task itself emits two outcomes (approved / rejected), but you can also add a Decision afterwards if your routing depends on extra conditions (e.g. long leaves go to HR).

For the simple case, skip the Decision and connect the Approval Task's outcomes straight to the right Actions.

5. Add the "Approved" branch

  1. Drag in an Action node. Label it Mark approved.
  2. Action type: Update field. Field: status. Value: approved.
  3. Connect Supervisor review → Mark approved on the approved edge.
  4. Drag in another Action node. Label it Email applicant — approved.
  5. Action type: Send email. Template: leave-approved. To: staff.email.
  6. Connect Mark approved → Email applicant — approved.
  7. Drag in an End node. Label it Approved.
  8. Connect Email applicant — approved → Approved.

6. Add the "Rejected" branch

Repeat step 5, but with rejected values and a leave-rejected template. End node label: Rejected.

7. Save and review

Open the Checklist tab in the Assistant drawer. You should see all green ticks. If anything fails, fix it before publishing.

8. Publish

Click Publish at the top right of the workflow editor. The workflow is now live and will run on the next status change.

What happens at runtime

  1. Creator submits a leave application — status flips to submitted.
  2. Workflow trigger fires.
  3. Supervisor sees the request in their inbox.
  4. Supervisor approves or rejects.
  5. The chosen branch runs — field updates and email send happen automatically.
  6. End node logged in the workflow audit trail.