Weekly post-mortem drafts in Notion from incident.io

By General Input

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.

Integrations

  • incident.io
  • Notion
  • Slack

Type

Agentic Task

Categories

  • Engineering
  • Operations

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.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teamsCatch feature flags that never got switched on in productionScreen chartered vessels for AIS gaps and sanctions red flags