Run a distributed priority job queue with Redis and Anthropic
Ready for 3.0What this workflow does
This workflow has 84 nodes and runs when an HTTP POST request hits its webhook URL (plus 5 other triggers). Along the way it connects Redis.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 5 other triggers).
- Set Producer Config (Edit Fields (Set)): sets 4 fields: defaultMaxAttempts, retentionSeconds, notifyChannel…
- Parse Queue Status Request (Code): runs custom JavaScript code
- Parse Cancellation Request (Code): runs custom JavaScript code
- Set Worker Configuration (Edit Fields (Set)): sets 11 fields: laneOrder, agingEvery, maxJobsPerRun…
- Maintenance Configuration (Edit Fields (Set)): sets 3 fields: batchSize, retentionSeconds, notifyChannel
- Validate Job Configuration (Code): runs custom JavaScript code
- Check Job Id Presence (If): checks a condition and branches into true / false
- Check Valid Cancel Request (If): checks a condition and branches into true / false
- Redis: incr
- Plan Maintenance (Code): runs custom JavaScript code
…plus 68 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (10)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Respond to Webhook
n8n-nodes-base.respondToWebhook - Redis
n8n-nodes-base.redis - Redis Trigger
n8n-nodes-base.redisTrigger - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Switch
n8n-nodes-base.switch - HTTP Request
n8n-nodes-base.httpRequest
From the author
Quick overview This workflow implements a distributed priority job queue in n8n using Redis for storage, lane-based scheduling, and worker wakeups, with optional Anthropic LLM execution and outbound HTTPS calls, plus webhook endpoints for enqueueing jobs,…