See llms.txt for all machine-readable content.

Back to Templates

Draft and track incident postmortems with OpenAI, Google Sheets, Discord, and Gmail

Last update

Last update 10 hours ago

Categories

Share


Quick overview

This workflow captures incident reports via an n8n form, uses OpenAI (DeepSeek) to draft a blameless postmortem, logs results and action items to Google Sheets, and notifies the team through Discord and Gmail, including weekly follow-ups for open and overdue action items.

How it works

  1. Receives an incident report submission through an n8n Form trigger.
  2. Normalizes the submitted fields, assigns an incident ID and timestamps, and validates that title, summary, and severity are present.
  3. If required fields are missing, posts an alert to Discord and emails the reporter via Gmail to resubmit the incident report.
  4. If the report is valid, sends the incident details to OpenAI (DeepSeek) to generate a JSON postmortem draft containing an overview, timeline, root cause, impact, action items, and a short digest.
  5. Parses the AI output, appends the postmortem to a Google Sheets “Postmortems” tab, extracts and appends action items to a Google Sheets “ActionItems” tab, and emails the full postmortem to the reporter via Gmail.
  6. Posts the digest to Discord, and if severity is high or critical, sends an additional on-call alert to Discord.
  7. Every Monday at 09:00 (Asia/Jakarta), reads open action items from Google Sheets, emails and posts Discord alerts for overdue items, and sends a weekly digest (AI-written via OpenAI) to Gmail and Discord or posts an “all clear” message if none are open.

Setup

  1. Connect your OpenAI API credentials and select the DeepSeek model used for both postmortem drafting and weekly digest generation.
  2. Connect your Google Sheets OAuth credentials and update the spreadsheet ID and ensure it contains “Postmortems” and “ActionItems” sheets with the expected columns.
  3. Connect your Gmail OAuth2 credentials and update the recipient addresses used for the postmortem email and the weekly digest email.
  4. Connect your Discord bot credentials and set the target server (guild) and channel IDs for invalid-report alerts, postmortem digests, overdue alerts, and weekly digest posts.
  5. Review the weekly schedule (cron) and timezone settings and adjust them to match when you want follow-up reminders to run.