Workflows Overview¶
Workflows are the core of m9m - automated processes that connect nodes to accomplish tasks.
What is a Workflow?¶
A workflow is a directed graph of nodes that:
- Starts with a trigger (manual, webhook, schedule)
- Processes data through connected nodes
- Outputs results or performs actions
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
│ Trigger │────▶│ Fetch │────▶│Transform│────▶│ Send │
│ │ │ Data │ │ Data │ │ Alert │
└─────────┘ └─────────┘ └─────────┘ └─────────┘
Workflow Structure¶
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Workflow name |
nodes |
array | Yes | List of nodes |
connections |
object | Yes | Node connections |
settings |
object | No | Workflow settings |
active |
boolean | No | Enable triggers |
Workflow Lifecycle¶
Key Concepts¶
Nodes¶
Building blocks that perform operations:
- Triggers: Start workflows (Webhook, Cron)
- Actions: Perform tasks (HTTP, Database, Email)
- Transform: Modify data (Set, Filter, Code)
Connections¶
Define data flow between nodes:
Data Items¶
Data flows as items - JSON objects with optional binary:
Expressions¶
Dynamic values using input data:
Workflow Types¶
Manual Workflows¶
Started via API or CLI:
Webhook Workflows¶
Triggered by HTTP requests:
Scheduled Workflows¶
Run on a schedule:
Best Practices¶
- Clear naming - Use descriptive node and workflow names
- Error handling - Add filters to check for errors
- Modular design - Break complex logic into smaller workflows
- Test thoroughly - Test with sample data before activating
- Monitor executions - Watch for failures and optimize