Building Workflows
This guide walks you through building workflows in MIFY — from simple chains to complex multi-step pipelines with branching, human approval, and AI orchestration.

Workflow Basics
Section titled “Workflow Basics”A workflow in MIFY is a directed acyclic graph (DAG) — a series of connected steps that process data in one direction without loops.
Trigger → Node A → Node B → Node C (output) ↘ Node D ↗Every workflow has three elements:
- Trigger — how the workflow starts (manual, webhook, schedule, or event)
- Nodes — processing steps (AI calls, data transforms, logic gates, integrations)
- Edges — connections between nodes that define data flow
Node Categories
Section titled “Node Categories”MIFY provides 117 native nodes across 24 categories:
| Category | Examples | Purpose |
|---|---|---|
| LLM | Chat, Embed, Image Generate, Vision, ASR, TTS | AI model operations |
| Transform | Template, JavaScript | Data transformation |
| Logic | Route If, Route Switch, Loop Map, Sub-Workflow | Flow control |
| RAG | Ingest, Chunk, Embed, Store, Retrieve, Rerank | Retrieval-augmented generation |
| Platform | Dify, Flowise, Langflow, n8n, and 20+ more | External platform integration |
| Agent | ReAct, Multi-Agent, CLI Agent | AI agent orchestration |
| Safety | PII Detector, Injection Detector, Jailbreak Detector | Content protection |
| Enterprise | Email, Calendar, Notifications, Quota, Policy | Business integrations |
| Cloudflare | D1, KV, R2, Vectorize, Queues | Edge storage and compute |
Step-by-Step: Build a RAG Workflow
Section titled “Step-by-Step: Build a RAG Workflow”Let’s build a workflow that answers questions using your own documents.
1. Create the Trigger
Section titled “1. Create the Trigger”Drag a Manual Trigger onto the canvas.
2. Add Document Retrieval
Section titled “2. Add Document Retrieval”Drag a Retrieve node. Configure it:
- Knowledge Base: Select your knowledge base (create one at
/knowledgefirst) - Top K: 5 (return top 5 relevant chunks)
Connect the trigger to the Retrieve node.
3. Add the AI Response
Section titled “3. Add the AI Response”Drag a Chat node. Configure it:
- System Prompt: “Answer the user’s question based on the following context: {{context}}”
- Provider: Your preferred AI provider
- Model: Your preferred model
Connect the Retrieve node to the Chat node. The retrieved documents flow as context.
4. Run and Test
Section titled “4. Run and Test”Click Run, enter a question, and see the AI respond using your documents as context.
Templates
Section titled “Templates”MIFY includes 140 built-in templates for common patterns:
| Category | Templates | Examples |
|---|---|---|
| RAG | 9 | Document Q&A, Knowledge Base Chat |
| LLM | 12 | Text Summary, Translation, Classification |
| Logic | 17 | Conditional Routing, Batch Processing |
| Platform | 63 | Flowise Import, Dify Bridge, n8n Connector |
| Agent | Multi-agent | ReAct Agent, Research Agent |
Browse templates at /templates in the UI. Click any template to preview it, then Use Template to add it to your canvas.
Human-in-the-Loop (HITL)
Section titled “Human-in-the-Loop (HITL)”Add human approval gates to any workflow:
- Drag a Pause node between any two nodes
- When execution reaches the Pause node, it stops and waits
- A notification appears in your Inbox (
/inbox) - Review the data, then Approve or Reject
- Approved: execution continues. Rejected: execution stops.
Use HITL for:
- Reviewing AI-generated content before publishing
- Approving financial transactions
- Validating data extraction results
- Any decision that needs human judgment
Execution Modes
Section titled “Execution Modes”| Mode | Use Case | Behavior |
|---|---|---|
| Experimental | Development | Minimal overhead, fast iteration |
| Audited | Compliance | Full audit trail, integrity hashing |
Importing from Other Platforms
Section titled “Importing from Other Platforms”Already using another workflow platform? Import directly:
| Platform | How |
|---|---|
| Flowise | /canvas → Import → Paste Flowise JSON |
| Dify | /canvas → Import → Paste Dify YAML |
| Langflow | /canvas → Import → Paste Langflow JSON |
| n8n | /canvas → Import → Paste n8n JSON |
MIFY maps foreign nodes to native equivalents where possible. Unmapped nodes become “opaque” nodes that delegate to the original platform.
Content Generation
Section titled “Content Generation”MIFY includes a dedicated content generation system at /content-gen:
| Path | How It Works | Best For |
|---|---|---|
| MIFY Queue | Submits ComfyUI workflows to GPU providers | High-quality image/video |
| AI Provider | Direct calls to AI providers (sync or streaming) | Text, quick image gen |
| ComfyUI Local | Runs workflows on your local ComfyUI | Custom models, local dev |
Next Steps
Section titled “Next Steps”- API Reference — Programmatic workflow management
- Troubleshooting — Common issues
- Overview — Full platform capabilities