Library
N8N Foundation · Chapter 7 of 10
Chapter 07

Advanced
Workflows

Sub-workflows, error handlers, queues, batching, and the patterns that keep production automations calm.

AdvancedErrorsQueues
A Handbook For Builders
Advanced
Workflows
Chapter 07
The Claude Code Handbook

Big workflows are small workflows composed together. Learn the composition patterns.

Section 1

1. Sub-workflows

Extract shared logic (send-email, log-error, enrich-lead) into its own workflow. Call via Execute Workflow.

Section 2

2. Error Handling

  1. Create a global "Error Handler" workflow.
  2. Every prod workflow's Settings → Error Workflow → point at it.
  3. Handler: log to DB + Slack ping + optional retry.
Section 3

3. Queues

Set queue mode with Redis to run executions across multiple workers.

bashclaude-code
EXECUTIONS_MODE=queue
QUEUE_BULL_REDIS_HOST=redis
Section 4

4. Batching

Split In Batches keeps you under rate limits and controls memory.

Section 5

5. Scheduling

  • Cron for recurring jobs.
  • Wait Until for one-off delays.
  • Interval for polling APIs without webhooks.
Section 6

6. Retries

Set retry-on-fail per node. Exponential backoff for external APIs.

Section 7

7. Testing