Weekly post-mortem drafts in Notion from incident.io
Every Monday, an agent drafts a structured post-mortem page in Notion for each incident your team resolved last week, then shares a digest in Slack.
Build me an agent workflow that drafts post-incident review documents in Notion for every significant incident.io incident my team resolved in the past week, and posts a Slack digest linking the drafts.
Trigger: cron, every Monday at 9:00 AM America/New_York.
On each run, do the following:
1. Use incident.io "List Incidents" to fetch every incident with a resolved status category whose resolved_at timestamp falls in the trailing 7-day window (now minus 7 days to now). Page through all results, not just the first page.
2. Filter that list down to incidents worth writing a post-mortem for. Skip anything where the incident is marked as a test or drill, or where severity is the lowest rank in the org (for example, severities named "Minor", "Low", or "Trivial"). If there is no significant incident, stop and do not post anything to Slack.
3. For each remaining incident, gather the full context: call incident.io "Show Incident" for the incident, "List Incident Updates" filtered to that incident to reconstruct the timeline, and "List Follow-ups" filtered to that incident for the existing action items and their owners.
4. Use that context to draft a structured post-mortem and create it with Notion "Create a Page". The parent should be a configurable Notion page (call it "Post-mortems parent page" in the workflow inputs; the user will paste the page ID at setup). The page title should be something like "Post-mortem: <incident name> (<resolved date>)". The page body should contain these sections, as Notion blocks:
• Summary — 2-4 sentences on what happened, who was affected, how long it lasted, and severity.
• Timeline — bullet list reconstructed from the incident updates, each line in the form "HH:MM UTC — <message>", in chronological order.
• Impact and severity — short paragraph stating the severity, customer impact (from custom fields or update content), and resolution duration.
• Candidate root cause — a clearly labeled hypothesis paragraph based on the updates, with a note that it needs human verification.
• Follow-ups — a to-do checklist where each item is one follow-up from incident.io, formatted as "<follow-up title> — owner: <assignee name or unassigned>" and left unchecked.
• Links — a short list including a link back to the incident in incident.io.
Add a callout at the top of the page that says this draft was generated automatically and needs human review before being shared.
5. Once all Notion drafts are created, use Slack "Send a Message" to post a single digest in a configurable channel (workflow input "Digest Slack channel"). The digest should say something like "Post-mortem drafts for incidents resolved <date range>" and list each incident on its own line with the incident name, severity, and a link to the new Notion page. Use Slack mrkdwn formatting, not standard Markdown.
Workflow inputs to expose:
• Post-mortems parent page (Notion page ID) — required.
• Digest Slack channel — required.
• Minimum severity to include — optional, defaults to "anything above the lowest severity rank".
• Look-back window in days — optional, defaults to 7.
Be defensive: if an incident has zero updates, still create the page with an empty timeline and a note explaining the gap. If the Notion page for an incident fails to create, log the error and continue with the next incident so one bad incident does not block the whole digest. If no significant incidents are found, do nothing and exit cleanly.
Additional information
What does this prompt do?
- Every Monday at 9am ET, finds every incident your team resolved in incident.io over the past seven days.
- For each significant incident, drafts a structured post-mortem page in Notion with a timeline, an impact and severity summary, a candidate root-cause hypothesis, and a checklist of existing follow-ups with owners.
- Skips low-severity and test incidents so the on-call lead only reviews drafts that actually matter.
- Posts a single Slack digest linking every new Notion draft so the team can review and fill in the gaps instead of assembling docs from scratch.
What do I need to use this?
- An incident.io account where your team manages incidents.
- A Notion workspace with a parent page (for example, a Post-mortems page) shared with your General Input connection.
- A Slack workspace and the channel where you want the weekly digest to land.
How can I customize it?
- Change the schedule (a different day, a different time zone, or a longer or shorter look-back window).
- Adjust the severity threshold so only major or critical incidents get a draft, or include everything above a certain customer impact.
- Pick a different Notion parent page or a template to write the post-mortem under, and choose a different Slack channel for the digest.
Frequently asked questions
Will it write the final post-mortem for me?
Does it create new follow-ups or change anything in incident.io?
What counts as a significant incident?
Can I run it more or less often than weekly?
What if no incidents were resolved last week?
Stop writing post-mortems from a blank page.
Connect incident.io, Notion, and Slack once, and every Monday morning your on-call lead opens a folder of drafted post-mortems ready to review.