Falaah Falaah AI

Building Workflows

Create powerful automations with Muin's visual workflow builder. Triggers, conditions, and actions for any business process.

Workflows automate your business processes without code. Use the visual drag-and-drop builder to define triggers that start the workflow, conditions with field/value/date operators that control the path, parallel execution paths, and actions that get work done. 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. Navigate to Workflows in the main navigation
  2. Click Create Workflow
  3. Enter a name and description
  4. The visual builder opens

Workflow Builder Interface

The drag-and-drop builder has three panels:

Left sidebar: Available triggers, conditions, and actions Center canvas: Visual workflow diagram with drag-and-drop node placement, conditions, and parallel paths Right panel: Properties for selected element with dynamic field selection (the Available Fields API surfaces relevant fields per step)

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. The condition system supports field, value, and date operators with dynamic field selection — the builder surfaces available fields for each step automatically.

Basic Conditions

Condition Checks
Document type is Specific document type
Field equals Field matches value
Field contains Field includes text
Amount is Greater than, less than, between
Date is Before, after, between, relative (e.g., within 30 days)
Status is Document status matches
Field is null/not null Presence check

Combining Conditions

Use AND/OR logic:

All conditions (AND):

Document type is Invoice
AND Amount is greater than $1,000
AND Vendor category is "Preferred"

All must be true.

Any condition (OR):

Amount is greater than $10,000
OR Category is "Emergency"

At least one must be true.

Nested logic:

(Document type is Invoice AND Amount > $5,000)
OR
(Document type is Contract AND Value > $25,000)

Condition Groups

Create condition groups for complex logic:

  1. Click Add Condition Group
  2. Choose AND or OR for the group
  3. Add conditions within the group
  4. Nest groups as needed

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:

  • Approver(s) - sequential or parallel
  • Approval required from: Any, All, Majority
  • Timeout and escalation rules
  • Approval/rejection actions

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

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 Mode

Test before activating:

  1. Click Test in the workflow builder
  2. Select a sample document
  3. Click Run Test
  4. Watch execution step by step
  5. Review what would happen at each step

Test with Dry Run

Actions don’t actually execute in dry run:

  • Emails show as “Would send to…”
  • Tasks show as “Would create…”
  • Status changes show as “Would update to…”

Review Test Results

After test:

  • See which conditions passed/failed
  • View action outputs
  • Identify issues to fix

Activating Workflows

Activation Steps

  1. Ensure all required fields are configured
  2. Click Save
  3. Click Activate
  4. Confirm activation

Active vs. Inactive

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

Workflow Versioning

When you modify an active workflow:

  1. Changes are saved as a draft
  2. Active version continues running
  3. Click Publish to make changes live
  4. Previous version saved in history

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

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

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: