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
- Receives an incident report submission through an n8n hosted form.
- Normalizes the input, generates an incident ID and timestamp, and validates that required fields (title, summary, severity) are present.
- If the report is incomplete, posts an alert to Discord and emails the reporter to resubmit with the missing details.
- 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.
- 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.
- 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.
- 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).
- 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
- Add credentials for Gmail, Google Sheets, Discord Bot, OpenAI, and Telegram.
- 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.
- Configure your Discord server (guild) and target channel IDs in the Discord message steps.
- Update recipient addresses in the Gmail steps (acknowledgment, invalid report notice, and stakeholder postmortem email) to match your escalation and notification list.
- Set the Telegram chat ID for where monthly RCA reports should be delivered.
- Review and adjust the weekly and monthly cron schedules and timezone to match your team’s follow-up cadence.