Falaah Falaah AI

Building Workflows

Four ways to build an automation in Muin: describe it in a sentence, start from a template, build a when/if/then rule, or open the Advanced editor. Test it with no side effects, review what it will do, then publish.

Workflows automate your business processes without code. There are four ways in, and they all end at the same place:

  1. Describe it. One sentence in your own words becomes a draft you can edit. (Growth and above.)
  2. Pick a template. A ready-made workflow you preview, adapt and publish. (Every plan.)
  3. Build a rule. When this happens, if these are true, do these.
  4. Open the Advanced editor. The full canvas, when the rule rows cannot say it.

Whichever door you use, you can test it before it runs and you review what it will do before it goes live. This guide covers everything you need to build effective automations.

Workflow Concepts

Every workflow has three parts:

┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│   Trigger    │ ──→ │  Conditions  │ ──→ │   Actions    │
│ (What starts │     │ (What filters│     │ (What gets   │
│  the flow)   │     │  the flow)   │     │    done)     │
└──────────────┘     └──────────────┘     └──────────────┘

Trigger: The event that starts the workflow Conditions: Rules that decide if actions should run Actions: What happens when conditions are met


Creating a New Workflow

Getting Started

  1. Go to Sidebar → Automation → Workflow Catalog
  2. Open the + Create menu and choose + Workflow
  3. Name it and click Create Workflow. Until you name and save it, the page tells you so: “Name and save this workflow to make it editable and runnable.”
  4. The visual builder opens

Workflow Builder Interface

The builder has two modes, picked from the View / Edit tabs in the header. View is read-only and always available; Edit appears when you have permission to author workflows.

Left sidebar: the step palette, grouped into things the workflow does and decisions it makes Center canvas: the workflow as a graph, with branches, loops and parallel paths Right panel: the properties of whatever you have selected, with the fields that step can use

Header controls: Add step, Undo and Redo, Ask to change (describe the change in a sentence and the assistant edits the graph), and Workflow settings. An Unsaved changes chip tells you there is work not yet saved, and an error count chip tells you how many problems the graph has.

Step types

Group Step What it does
Does Action Performs one action
Does Set a value Computes or copies a field
Does Run a workflow Reuses another workflow
Does Send an event Emits an event other workflows can listen for
Decides Branch If / otherwise
Decides Split in parallel Waits for all, any, or N of several paths
Decides Wait for a person An approval or a task
Decides Wait A delay, aware of business hours
Decides Repeat for each Line items, people, rows
Decides Try, and if it fails Retry, then recover
Decides Stop with an error Ends the run as failed

A Wait for a person step must name who acts. The builder asks for it, and saving is refused if a person step has nobody assigned and no assignment step before it - an approval nobody owns is a workflow that stalls forever.

Working on a phone

The canvas needs a wide screen. On a phone the builder says so and offers the two things that do work there: Review & publish and See run history.

The definition record

Every saved workflow also has a plain record page, reached by clicking its row in the Workflow Catalog. It has two tabs:

  • Overview - Workflow Steps, Trigger Configuration, Recent Runs, and an AI Cost Estimate showing roughly what a run costs and what that comes to for your monthly volume.
  • Versions - every version with its state: Draft, Published, Deprecated or Archived, and who created and published it. You can publish, deprecate or archive from here. Restore this version (shown to anyone who can edit workflows) copies an earlier version into a NEW draft named “Restored from vX” and makes it the working copy. Nothing goes live until that draft is reviewed and published, and the newer versions stay in the history.

The header names who created the workflow and who last changed it, and its Owner. The owner is the person accountable for the workflow and is told when a run fails. A new workflow is owned by whoever created it (or duplicated it). Anyone who can edit workflows can click Change owner, pick another member of the workspace and add an optional reason; the change is kept in the audit trail as “owner changed”. Only an active member of the workspace can be made owner.

Requiring a second person to publish

Under Settings > Workflow Settings > Alerts & publishing, Publishing, turn on Require a second person to publish and save. From then on, anyone who has edited the workflow’s content (not only the last editor) cannot publish it: publishing shows “This workspace requires a second person to publish: you have edited this workflow, so someone else has to review and publish it.” Another person with edit access opens the draft’s review and publishes it. The setting is off by default, and drafts that are already published keep running.

Header actions: Activate / Deactivate, Configure Triggers, Duplicate, Edit and Delete. Deactivating confirms first and explains itself: future triggers stop, and active runs continue to completion. You can add an optional reason; it is kept with the change. Deleting is permanent and archives the inactive runs.

Every change of this kind is recorded with who made it and the reason given: created, edited (only when a value actually changed), published, activated, deactivated, restored, a step reassigned to someone else, and a step an admin moved on for its assignee. See them under Administration > Audit & Security > Unified Audit, source Workflows.

A run waiting on somebody shows as “Waiting on <name>” in Recent Runs, or “Waiting - unassigned” when the step has no owner.

Naming Best Practices

Good workflow names are:

  • Descriptive: “Invoice Approval Routing”
  • Action-oriented: “Route High-Value Invoices for CFO Approval”
  • Searchable: Include key terms

Choosing a Trigger

Triggers define when your workflow runs.

Document Triggers

Trigger When It Fires
Document uploaded New document arrives
Document type detected AI identifies document type
Document processed AI extraction complete
Document status changed Status transitions (e.g., to Approved)

Field Triggers

Trigger When It Fires
Field value changed Any extracted field changes
Amount threshold Amount exceeds/falls below value
Date reached Due date, expiration, or custom date

Time-Based Triggers

Trigger When It Fires
Scheduled Specific time (daily, weekly, monthly)
Recurring Every X hours/days
Date reached When a tracked date arrives

Manual Triggers

Trigger When It Fires
Manual User clicks “Run Workflow” button
Button click Custom button on document
API call External system triggers via API

Trigger Configuration

  1. Drag a trigger from the sidebar to the canvas
  2. Click to select it
  3. Configure in the right panel:
    • Trigger type specifics
    • Filters (which documents apply)
    • Frequency limits

Adding Conditions

Conditions control whether actions execute. A condition is one expression, and you can write it two ways: as simple rows in plain words, or in the expression editor. The rows are a view over the same expression, so switching tabs never changes what the condition means. The builder surfaces the fields each step can reference, so you pick a field rather than typing a path.

Simple rows

Each row is field · operator · value, and the rows are joined with all of these or any of these.

Operator Reads as
= is
!= is not
> is more than
>= is at least
< is less than
<= is at most
contains contains
startswith / endswith starts with / ends with
before / after is before / is after (a date)
within_days is within N days
in is one of (type the values separated by commas)
between is between (a lowest and a highest value, both included)
is_null / is_not_null is empty / is not empty
is_blank is blank (no value, or empty text)

All of these (AND):

Document type is Invoice
Amount is more than 1000
Vendor category is Preferred

All must be true.

Any of these (OR):

Amount is more than 10000
Category is Emergency

At least one must be true.

Groups. Click + Add a group to put a few rows in a box with their own join word. A new group starts with the opposite word to the rows around it, so “all of these, and any of these” reads naturally:

All of these:
  Document type is Invoice
  Any of these:
    Amount is more than 10000
    Vendor category is one of New, Unverified

Use Match any instead / Match all instead on the group to flip its join word, and Remove to drop the whole group. Groups go one level deep; anything deeper is written in the expression editor.

To check records against the same rules in many workflows, save them once as a rule set: see Business rules.

When the rows cannot say it

Anything the rows cannot express is written in the expression editor instead: date maths, nested groups, and computations over a step’s output all live there. The editor shows the expression’s live value against your last test run or a sample, and an expression that does not parse reports the error at the caret rather than going blank. When an expression falls outside what the rows can represent, the Simple tab is disabled and the editor opens: “Need something the rows cannot say? Write it as an expression.”


Configuring Actions

Actions are what your workflow does.

Notification Actions

Action What It Does
Send email Email to specified recipients
In-app notification Alert in Muin
Slack message Post to Slack channel
SMS alert Text message (premium)

Email configuration:

  • Recipients (fixed emails, dynamic from fields, role-based)
  • Subject line (can include document fields)
  • Body template (rich text, merge fields)
  • Attachments (include document)

Task Actions

Action What It Does
Create task Add to task queue
Assign task Assign to specific user/role
Update task Modify existing task
Complete task Mark as done

Task configuration:

  • Title and description
  • Due date (fixed or relative)
  • Priority
  • Assignee (user, role, or dynamic)

Routing Actions

Action What It Does
Route for approval Send for approval
Escalate Send to higher authority
Reassign Change current assignee
Return Send back to previous step

Approval routing:

Document Actions

Action What It Does
Update status Change document status
Add tag Apply tag to document
Move to folder Organize document
Update field Change field value
Generate document Create from template

Integration Actions

Action What It Does
Call webhook POST to external URL
Send for e-signature Route a document to BoldSign for signing
Create accounting entry Sync to QuickBooks
Run agent Trigger Muin Agent

Human Steps

Some steps wait for a person: an approval, a review, a hand-off. Open the step on the canvas to set who acts, how they decide and what happens if nobody answers.

Approval steps

Add an Approval step from the step palette. Under Who has to approve, pick a mode:

Mode What finishes the step
One person The one assignee approves or rejects
Any one of the approvers The first approval
Every approver All approvers approve; one rejection takes the rejection path
A set number of approvers Approvals needed of the listed approvers approve, for example 2 of 3
Each approver, in order Approver 1 decides first; approving moves to approver 2, and so on. Any rejection takes the rejection path

In Each approver, in order, a person who approved an earlier level of the step cannot approve a later level of it; only the owner can, by adding a note that stays on the record. Separate Approval steps are not linked.

In Any one of the approvers, Every approver and A set number of approvers, one person counts once: someone who already decided one approver’s task cannot decide another approver’s task in the same step.

The person who started the run cannot approve its Approval step. Only the owner can, and only by saying why, unless an approval rule blocks self-approval outright; the note stays on the record.

For every mode except One person, add at least two approvers with Add approver. Each approver is a role, a specific person, a reporting manager or a person named in a form field. In the parallel modes (any, every, a set number) each approver gets their own task in the Inbox at the same time. As soon as the required approvals can no longer be reached, the run takes the rejection path.

The builder refuses a step it cannot run, by name: fewer than two approvers, or more approvals needed than there are approvers. Such a workflow cannot be saved or published until it is fixed.

Who gets the task

Assign to offers:

Option Who receives the task
A role A person holding that role in your organization
A specific person That person
Manager of the submitter The reporting manager (from HR) of the person who submitted the form or record
Manager of the person who started it The reporting manager of the person who started the run
Person in a form field The person whose user id or email is in the field you name, for example form.approver_email

If nobody matches, assign to is the fallback. It is used when the first choice names nobody: the submitter has no manager on file, the field is empty, or it names someone who is not in your organization. With no fallback set, the task goes to the organization owner.

When a person does not answer in time

Set Give up after on the step, then When time runs out:

Choice What happens
Use the workflow’s rule The workflow-wide timeout rule applies
Escalate to the next person The task moves up the chain under Escalate to, in order, one level each time it times out
Hand it to someone else The task moves once to the person or role under Hand it to
Decline it automatically The step is treated as rejected and the run takes the rejection path
Move on without a decision The run continues to the next step

A step’s own choice wins over the workflow’s rule. With no escalation chain on the step, the workflow’s chain is used.

AI decisions a person reviews

To let the AI choose between paths, add an AI decision step from the Decide & wait group. It starts with two paths, approve and reject, and you can open the step to change them:

  1. Name each path and, under When this path is right, tell the AI when to take it. Use Add a path for more. A step always keeps at least two paths.
  2. Connect each path with Then go to: pick the step it leads to, the next step, or the end of the workflow. Each path shows on the canvas as its own labelled branch.
  3. Set the confidence threshold (0 to 100%). The step starts at 80%. Clear it and the run always follows the AI, with nobody reviewing.
  4. Choose who reviews under Who reviews. With nobody set, the organization owner reviews.

When the AI’s confidence meets the threshold, the run takes the path the AI chose and asks nobody. When it is below the threshold, the run does not take the AI’s path: it waits on a Review an AI decision task in the reviewer’s Inbox. The run stays there until the reviewer answers. The task says what the AI suggested, its confidence and its reasoning, and offers the step’s own paths as buttons.

On the run page, open the AI step to see the decision, the confidence and whether it was sent to a person. When a reviewer picks a different path than the AI suggested, the run’s timeline marks the step Overrode the AI and the audit log records it.

Notification templates

A notification step can send a ready-made Message instead of text you write. Pick one from the list (for example “Approval needed”, “Step completed”, “Escalated to you” or “Review requested”) and use Preview to read it with this workflow’s names filled in. Choose the channels it goes out on: in the app, email, SMS, push or WhatsApp. To send it to a person named on the record, set the recipient to a form field. A message key that is not a template is refused when you save, unless you also write your own message.

Building Your First Workflow

Example: Invoice Approval Routing

Let’s build a workflow that routes invoices for approval based on amount.

Step 1: Add Trigger

  1. Drag “Document processed” trigger to canvas
  2. Configure: Document type = Invoice

Step 2: Add Conditions

  1. Drag “Amount condition” below trigger
  2. Connect them (drag from trigger output to condition input)
  3. Configure: Amount > $500

Step 3: Add Branch For different approval paths:

  1. Drag “Condition Branch” element
  2. Create two paths:
    • Path A: Amount $500-$5,000 → Manager approval
    • Path B: Amount > $5,000 → CFO approval

Step 4: Add Actions

  1. For Path A: Drag “Route for approval” action
    • Approver: Document’s department manager
    • Due: 3 business days
  2. For Path B: Drag “Route for approval” action
    • Approver: CFO
    • Due: 2 business days

Step 5: Add Completion Actions After approval:

  1. Drag “Update status” action
  2. Configure: Status = “Approved for Payment”
  3. Drag “Create task” action
  4. Configure: “Process payment for [vendor]”

Testing Workflows

Test it before it runs

Open a workflow and choose Test workflow. Pick a sample document; each step shows what it would do on that sample. Nothing is sent, assigned or posted.

The run ends with a one-line summary:

5 of 6 steps ran · 1 waiting on a person · no side effects

“No side effects” is counted, not assumed. The server tallies every step result that comes back without the test-run marker, and the summary reads 1 SIDE EFFECT: this test changed real data if one ever does. On the shipped product that count is zero: a test run rolls its database work back, runs each action’s describe path instead of its execute path, and gates the handful of writes a rollback cannot reach.

A step that failed says why, and you can ask the assistant to change that step with the failure already filled in.

What a test run does and does not compute

Steps that only compute, setting a field, validating, routing by amount, gathering data, produce their real output on your real data. Every other step, including AI steps, describes what it would do rather than doing it. You can also pin a step’s output and re-run from there, so you can rehearse a later branch without replaying the whole workflow.

Test with real data

The test drawer asks where the test data comes from:

  • Enter it by hand: type or paste the data.
  • A past submission of this form: for a workflow started by a form, pick a recent submission and the test runs on its real answers.
  • A past run of this workflow: replay the inputs of an earlier run. Steps that already produced output in that run are pinned to it, so the test follows the same path. A workflow that has never run says so.

Checks while you build

The builder checks the workflow as you edit and lists what it finds in the validation panel.

Kind What it means Examples
Error The workflow cannot run as built. Publish stays disabled until every error is fixed. A loop with no way out (once a run enters it, no path reaches the end); an expression that does not parse
Warning The workflow runs, but you almost always want to know. Warnings never block publish. A step that waits for a person with no deadline; a notification with no message or no recipients; an AI or agent step with no fallback or confidence threshold; failure alerts turned off; a form trigger with no condition

Some checks need the server: whether the tools, connectors and people a step names exist in your organization. The builder sends the unsaved workflow to the server a moment after you stop typing and merges its findings into the same panel. If that check cannot be reached, the panel says so and offers Retry; the server checks the workflow again when you publish either way.


Review and Publish

Review before publish

Before a version goes live you see what starts it, what it will do and who it affects, in plain words:

Section What it answers
Starts when The trigger that sets this workflow running
It will Every effect the workflow can have, with new in v2 on anything this version adds
Who feels it The roles and recipients named in the configuration
Tested Whether it has been tested, and what that test found

Publish is disabled until that summary has rendered: a button that publishes a summary nobody has seen is exactly what this page removes. Publishing is refused if the workflow changed after you reviewed it: you are told “This workflow changed since you reviewed it. Reload the review.” and nothing goes live.

The same gate applies to switching an automation rule on. There is no other path to live.

Active vs. Inactive

State Behavior
Inactive Workflow saved but won’t run
Active The published version runs when triggered
Paused Temporarily stopped, can resume

A workflow that is switched on but has never been published through the review gate does not run.

Workflow Versioning

When you modify a live workflow:

  1. Changes are saved as a draft; the live version keeps running
  2. Review & publish shows what the new version will do
  3. Publishing makes it live, and the previous version stays in history
  4. Runs already in flight finish on the version they started on: a publish never changes a run mid-flight
  5. To go back, open Versions and use Restore this version: it makes a new draft from that version, which you then review and publish

Describing a workflow in your own words and editing steps with the assistant are available on Growth and above; every plan can preview, adapt and publish a template.


Workflow Templates

Start faster with 25 pre-built templates.

Available Templates (examples)

Template Purpose
Invoice Approval Route invoices by amount with auto-approval thresholds
Certification Renewal Alert on expiring certs
Vendor Compliance Request missing documents
Vendor Onboarding Document collection, risk assessment, and approval
Contract Renewal Notify before expiration
New Employee Onboarding Document collection checklist
Expense Approval Route by amount and category
Grant Application Review Committee review and board vote

Browse all 25 templates in Workflows > Templates.

Using Templates

  1. Click Templates in Workflows
  2. Browse or search templates
  3. Click Use Template
  4. Customize for your needs
  5. Save and activate

Creating Templates

Save your workflows as templates:

  1. Open a working workflow
  2. Click Save as Template
  3. Add template name and description
  4. Share with team (optional)

Monitoring Workflows

Workflow Dashboard

See all workflow activity:

  • Active workflows count
  • Runs today/this week
  • Success/failure rates
  • Recent executions

Execution Logs

Every workflow run is logged:

  1. Navigate to Workflows → History
  2. Filter by workflow, date, status
  3. Click any run to see details

Run Details

Each run shows:

  • Trigger event that started it
  • Document(s) involved
  • Conditions evaluated (pass/fail)
  • Actions executed
  • Errors if any

Debugging Failures

When a workflow fails:

  1. Open the failed run
  2. See where it failed
  3. View error message
  4. Fix the issue
  5. Optionally re-run

Advanced Features

Parallel Paths

Run multiple branches simultaneously for independent tasks:

  1. Add a “Parallel” block to the canvas
  2. Add actions within each parallel branch
  3. All branches execute at once
  4. Workflow continues after all parallel branches complete

Loops

Process multiple items:

  1. Add a “For Each” block
  2. Configure the collection (e.g., line items)
  3. Add actions that run for each item

Wait Steps

Pause workflow until condition met:

  1. Add “Wait” block
  2. Configure wait condition:
    • Wait for approval
    • Wait for time period
    • Wait for field value

Error Handling

Handle failures gracefully:

  1. Add “Error Handler” block
  2. Configure fallback actions:
    • Send notification
    • Create task for manual handling
    • Retry with different approach

Failure Alerts

When a run goes wrong, the right people hear about it without anyone watching the dashboard.

What triggers an alert

  • The run failed: a step failed and the run stopped.
  • The run timed out or got stuck: it passed its deadline, or stopped moving. A stuck run is restarted from its current step first; if it is still stuck, it is stopped and alerted.
  • A trigger was suspended: a trigger that fails to start its workflow five times in a row is paused, and an alert says why. Turning it back on clears the failure count.
  • A deadline (SLA): optionally, a step that is about to miss, or misses, its deadline.

One failure sends one alert. Each alert links to the run, which shows the step that stopped it.

Who is alerted and how

Choose any of:

  • The person who started the run
  • The workflow owner
  • Everyone with a given role
  • Specific people

And any of these channels:

  • In the app (the notification bell)
  • Email
  • A Slack or Microsoft Teams channel: paste the channel’s incoming-webhook address. It must start with https://. Once saved, the address is hidden; leave it as is to keep it, or paste a new one to replace it.

A setting that would reach nobody, for example a role no one in your organization holds, is refused when you save it.

Organization default and per-workflow settings

  • Organization default: Settings > Workflow Settings > Alerts & publishing > Failure alerts. Until you set it, the person who started the run and the workflow owner are alerted in the app and by email.
  • Per workflow: in the builder, open Workflow settings and set When this workflow fails, alert to Use the organization default, Choose people and channels for this workflow, or Do not send alerts.

Changing these settings needs permission to manage workflow definitions (for example the Workflow Administrator role). Other team members do not see Workflow Settings.


Troubleshooting

Workflow Not Triggering

  1. Check activation - Is workflow active?
  2. Verify trigger - Does document match trigger criteria?
  3. Check conditions - Are conditions too restrictive?
  4. Review logs - Any errors recorded?

Actions Not Executing

  1. Check conditions - Did conditions pass?
  2. Verify configuration - All required fields set?
  3. Check permissions - Does workflow have needed access?
  4. Review action logs - Specific error messages?

Performance Issues

  1. Simplify conditions - Complex logic can slow execution
  2. Limit notifications - Avoid notification storms
  3. Optimize loops - Don’t process large sets item by item

Messages You May See

What you see Why What to do
“That arrow can’t go there” The connection is not valid between those two steps Connect from a step that can hand off to that one
“This transition always runs; only a case or guard can carry a condition.” You put a condition on an unconditional arrow Use a Branch step, or set the condition on the arrow’s case or guard
“Fix the workflow errors before publishing.” The graph still has errors Open the error chip in the header to see them
“This workflow changed since you reviewed it. Reload the review.” Somebody edited it after you opened the review Reload the review and read it again before publishing
“You do not have permission to publish this workflow. Ask an administrator.” Publishing needs workflow definition management Ask an admin to publish it
“This version was not published. The workflow document was refused…” The definition itself was rejected Read the named refusals on the review page and fix each one
“Saved, but the canvas could not re-read it. Reload to see it.” The save landed but the canvas is stale Reload the page. Your work is saved
A step warning that it sends through a connector your organization has not set up The action needs an integration you have not connected It can be saved, but it will not run until that connector is connected
“Editing steps is included from Growth.” Step editing needs the Custom Workflows feature You can still review and publish the template as it is

Best Practices

Design

  1. Start simple - Get basic workflow working first
  2. Name clearly - Future you will thank present you
  3. Document logic - Add descriptions to complex conditions
  4. Test thoroughly - Test all paths before activating

Maintenance

  1. Review regularly - Audit active workflows quarterly
  2. Clean up unused - Deactivate or delete obsolete workflows
  3. Monitor failures - Address issues promptly
  4. Version control - Keep history of changes

Notifications

  1. Don’t over-notify - Too many alerts get ignored
  2. Be specific - Include actionable information
  3. Route appropriately - Right person for right action
  4. Use escalation - Auto-escalate if no response

Next Steps

Now that you understand workflows: