A postmortem framework is a 5-section template (What Happened, Why It Happened, What We Learned, What We'll Do Differently, Success Metrics) for documenting automation failures in n8n, Claude Code, or any AI system. Storing entries in a Claude Projects Failure Database lets you run pattern analysis after five postmortems and cut repeated mistakes by 60%.
What you will be able to do
- Build a Claude Projects "Failure Database" with custom instructions that guide you through the 5-section postmortem template
- Document a single automation failure in about 15 minutes using conversational prompts
- Run a pattern analysis prompt after five or more postmortems to surface your top three failure types and their root causes
- Turn identified patterns into a prioritized prevention action plan with testing requirements and success metrics
- Connect a Level 4 n8n error escalation alert to a postmortem entry so technical details are pre-populated
Before you start
- A claude.ai account with access to Claude Projects
- At least one recent automation failure to document, such as a broken n8n workflow or failed Claude Code agent
- Familiarity with the 4-level n8n error handling system from the previous article in the series, needed to wire automatic triggering
- Optional: screenshots, workflow JSON exports, or API logs from the failure to upload as supporting evidence
Reference
| Step | Action |
|---|---|
| 1. Create project | In claude.ai, click Projects, then Create Project, and name it "Failure Database" |
| 2. Add description | Enter: "Systematic documentation of automation failures, root cause analysis, and pattern recognition to prevent repeated mistakes." |
| 3. Install template | Click Edit project details, paste the postmortem system instructions into Custom instructions, click Save changes |
| 4. Document first failure | Type "Run postmortem: [brief description of what failed]" in the project chat and answer Claude's follow-up questions |
| 5. Upload evidence (optional) | Click the paperclip icon and attach screenshots, workflow JSON exports, or API logs |
| 6. Repeat and analyze | Log every new failure going forward; after 5 or more postmortems, run the pattern analysis prompt |
Common errors and fixes
| What goes wrong | The fix |
|---|---|
| Postmortems feel like dwelling on shame after you already fixed the problem | Treat it like an aviation black box: the point is system data, not blame |
| Blank-page syndrome eats 45 minutes because there is no template | Use the 5-section template so Claude prompts you section by section |
| Memory fades within 48 hours, so the exact error message and workaround get lost | Document within 15 minutes of fixing the issue, while details are fresh |
| Notes end up in a Google Doc or Notion page you never find again | Store every entry in one Claude Projects "Failure Database" so it stays searchable in project memory |
| Postmortems stay one-off entries instead of building into pattern data | Set a calendar reminder to log every failure, then run pattern analysis once you have 5 or more postmortems |
Read the full walkthrough
The complete lesson, with screenshots and any downloads, is published on Substack as part of From Demo to Dependable: Production n8n Workflows.
More in this section
- Lesson 3: Workflow Contracts That Save You [FD2D #3]
- Lesson 4: Failure Is a Feature: Designing Error Handling [FD2D #4]
Continue the course
Browse all lessons in the From Demo to Dependable: Production n8n Workflows course, or subscribe to the GenAI Unplugged newsletter to get new lessons in your inbox.