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 a day ago

Categories

Share


Quick Overview

This workflow collects incident reports via an n8n form, uses OpenAI (DeepSeek) to draft a structured postmortem, logs postmortems and action items to Google Sheets, and notifies stakeholders through Gmail and Discord, with weekly overdue reminders and a monthly RCA trend summary sent to Telegram.

How it works

  1. Receives an incident report submission through an n8n hosted form.
  2. Normalizes the input, generates an incident ID and timestamp, and validates that required fields (title, summary, severity) are present.
  3. If the report is incomplete, posts an alert to Discord and emails the reporter to resubmit with the missing details.
  4. If the report is valid, sends an acknowledgment email via Gmail and uses OpenAI (DeepSeek) to generate a JSON postmortem draft with overview, timeline, root cause classification, impact, SLA hours, and action items.
  5. Parses the AI output, appends the postmortem to a Google Sheets “Postmortems” log, extracts action items, and appends them to a Google Sheets “ActionItems” tracker.
  6. Emails the full postmortem draft to the reporter via Gmail and posts a digest to Discord, escalating high or critical incidents with an on-call alert that includes SLA hours.
  7. Runs weekly to read open action items from Google Sheets and, if any are overdue, emails reminders and posts overdue alerts to Discord (or posts an all-clear message if none are open).
  8. Runs monthly to read this month’s postmortems from Google Sheets, summarizes RCA trends with OpenAI (DeepSeek), and sends the trend report to a Telegram chat.

Setup

  1. Add credentials for Gmail, Google Sheets, Discord Bot, OpenAI, and Telegram.
  2. Create a Google Sheets spreadsheet with “Postmortems” and “ActionItems” tabs (with matching columns), then update the spreadsheet ID and sheet names in the Google Sheets nodes.
  3. Configure your Discord server (guild) and target channel IDs in the Discord message steps.
  4. Update recipient addresses in the Gmail steps (acknowledgment, invalid report notice, and stakeholder postmortem email) to match your escalation and notification list.
  5. Set the Telegram chat ID for where monthly RCA reports should be delivered.
  6. Review and adjust the weekly and monthly cron schedules and timezone to match your team’s follow-up cadence.