Execution Modes
n8n workflows can execute in different modes depending on how they are triggered. Each mode has unique characteristics that affect execution behavior, data flow, and error handling.Overview of Execution Modes
Execution modes are defined by theWorkflowExecuteMode type:
Manual Mode
Manual mode is used for testing workflows in the n8n editor.Characteristics
- Execution
- Trigger Behavior
- Data Handling
- Executions are saved only if
saveManualExecutionssetting is enabled - Full execution data is available in the UI
- Debugging information is more detailed
Use Cases
- Testing workflow logic before activation
- Debugging node configurations
- Validating expressions with sample data
- Developing new integrations
Trigger Mode
Trigger mode is used when workflows are activated and run automatically.Characteristics
Trigger Types
Event-Based Triggers
Listen for external events:Examples:
- Webhook triggers (HTTP requests)
- Form triggers (form submissions)
- Chat triggers (chat messages)
Schedule-Based Triggers
Run on a schedule:Examples:
- Cron schedules
- Interval-based execution
- Time-based triggers
Lifecycle Management
Webhook Mode
Webhook mode handles incoming HTTP requests to webhook endpoints.Request Handling
Response Patterns
Webhook Paths
Internal Mode
Internal mode is used for system operations and subworkflows.Subworkflow Execution
Execution Context Inheritance
Error Mode
Error mode runs error workflows when other workflows fail.Error Workflow Execution
Error Workflow Pattern
Retry Mode
Retry mode re-executes failed workflows or nodes.CLI Mode
CLI mode executes workflows via command line.Execution Context
Each execution has a context that persists throughout execution:Mode-Specific Behavior
| Feature | Manual | Trigger | Webhook | Internal | Error |
|---|---|---|---|---|---|
| Save Execution | Optional | Yes | Yes | Yes | Yes |
| Live Updates | Yes | No | No | No | No |
| Timeout | Yes | Yes | Yes | No | No |
| Pin Data | Yes | No | No | No | No |
| Wait Nodes | Yes | Yes | Yes | Yes | No |
| Static Data | R/W | R/W | R/W | R/W | Read |
| Credentials | All | Active | Active | All | All |
Best Practices
- Test in manual mode: Always test workflows before activation
- Handle webhook timeouts: Return quick responses, process async
- Use appropriate triggers: Match trigger type to use case
- Configure error workflows: Set up centralized error handling
- Monitor active workflows: Track webhook calls and schedule runs
- Cleanup resources: Ensure trigger nodes cleanup properly
- Consider execution limits: Be aware of timeout settings
Next Steps
Creating Workflows
Learn workflow structure and design
Error Handling
Master error handling patterns