n8n workflow automation with retries, logging, and review queues
PURPOSE
Designs and outputs n8n workflow JSON with robust triggers, idempotency, error handling, logging, retries, and human-in-the-loop review queues.
WHEN TO USE
- Build an n8n workflow that runs every Monday and emails the compliance summary
- Add error handling and retries to this workflow, plus a review queue for failures
- Create a webhook workflow that logs every run and writes a status row to a tracker
- Make this n8n flow idempotent so it does not duplicate records when it reruns
WORKFLOW
- Clarify trigger: Cron/webhook/manual; schedule/timezone; concurrency expectations
- Define data contract: input schema, required fields, and validation rules
- Design idempotency: choose dedup key(s) and storage to prevent duplicates on retries
- Add observability: generate run_id, log start/end, store status row and error details
- Implement error handling: per-node error branches, retry with backoff, and final failure notification
- Add human-in-the-loop review queue: write failed items to a queue and require approval to reprocess
- "No silent failure" gates: if counts/thresholds fail, stop workflow and alert
- Output: If asked for JSON, produce importable n8n workflow JSON + runbook
- STOP AND ASK THE USER if destination systems are unknown, no dedup key exists, or credential strategy is not specified
SAFETY
- Read-only by default; only emit workflow JSON when explicitly requested
- Do not include secrets in JSON; reference env vars/credential names only
- Include audit logging + failure notifications