Muin is in private beta.Watch the public release announcement —talk to us.
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

TriggerWhen It Fires
Document uploadedNew document arrives
Document type detectedAI identifies document type
Document processedAI extraction complete
Document status changedStatus transitions (e.g., to Approved)

Field Triggers

TriggerWhen It Fires
Field value changedAny extracted field changes
Amount thresholdAmount exceeds/falls below value
Date reachedDue date, expiration, or custom date

Time-Based Triggers

TriggerWhen It Fires
ScheduledSpecific time (daily, weekly, monthly)
RecurringEvery X hours/days
Date reachedWhen a tracked date arrives

Manual Triggers

TriggerWhen It Fires
ManualUser clicks “Run Workflow” button
Button clickCustom button on document
API callExternal 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

ConditionChecks
Document type isSpecific document type
Field equalsField matches value
Field containsField includes text
Amount isGreater than, less than, between
Date isBefore, after, between, relative (e.g., within 30 days)
Status isDocument status matches
Field is null/not nullPresence 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

ActionWhat It Does
Send emailEmail to specified recipients
In-app notificationAlert in Muin
Slack messagePost to Slack channel
SMS alertText 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

ActionWhat It Does
Create taskAdd to task queue
Assign taskAssign to specific user/role
Update taskModify existing task
Complete taskMark as done

Task configuration:

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

Routing Actions

ActionWhat It Does
Route for approvalSend for approval
EscalateSend to higher authority
ReassignChange current assignee
ReturnSend 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

ActionWhat It Does
Update statusChange document status
Add tagApply tag to document
Move to folderOrganize document
Update fieldChange field value
Generate documentCreate from template

Integration Actions

ActionWhat It Does
Call webhookPOST to external URL
Update CRMSync to Salesforce, HubSpot
Create accounting entrySync to QuickBooks
Run agentTrigger 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

StateBehavior
InactiveWorkflow saved but won’t run
ActiveWorkflow runs when triggered
PausedTemporarily 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)

TemplatePurpose
Invoice ApprovalRoute invoices by amount with auto-approval thresholds
Certification RenewalAlert on expiring certs
Vendor ComplianceRequest missing documents
Vendor OnboardingDocument collection, risk assessment, and approval
Contract RenewalNotify before expiration
New Employee OnboardingDocument collection checklist
Expense ApprovalRoute by amount and category
Grant Application ReviewCommittee 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 WorkflowsHistory
  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: