Skip to main content

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 the WorkflowExecuteMode type:

Manual Mode

Manual mode is used for testing workflows in the n8n editor.

Characteristics

Key Points:
  • Executions are saved only if saveManualExecutions setting 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

1

Event-Based Triggers

Listen for external events:
Examples:
  • Webhook triggers (HTTP requests)
  • Form triggers (form submissions)
  • Chat triggers (chat messages)
2

Schedule-Based Triggers

Run on a schedule:
Examples:
  • Cron schedules
  • Interval-based execution
  • Time-based triggers
3

Poll-Based Triggers

Check external sources periodically:
Examples:
  • RSS feed polling
  • Email inbox polling
  • API endpoint polling

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

1

Configure Error Workflow

2

Add Error Trigger

3

Process Error

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

Best Practices

  1. Test in manual mode: Always test workflows before activation
  2. Handle webhook timeouts: Return quick responses, process async
  3. Use appropriate triggers: Match trigger type to use case
  4. Configure error workflows: Set up centralized error handling
  5. Monitor active workflows: Track webhook calls and schedule runs
  6. Cleanup resources: Ensure trigger nodes cleanup properly
  7. Consider execution limits: Be aware of timeout settings
Mode Detection in Nodes:

Next Steps

Creating Workflows

Learn workflow structure and design

Error Handling

Master error handling patterns