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
- Receives an incident report submission through an n8n Form trigger.
- Normalizes the submitted fields, assigns an incident ID and timestamps, and validates that title, summary, and severity are present.
- If required fields are missing, posts an alert to Discord and emails the reporter via Gmail to resubmit the incident report.
- 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.
- 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.
- Posts the digest to Discord, and if severity is high or critical, sends an additional on-call alert to Discord.
- 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
- Connect your OpenAI API credentials and select the DeepSeek model used for both postmortem drafting and weekly digest generation.
- Connect your Google Sheets OAuth credentials and update the spreadsheet ID and ensure it contains “Postmortems” and “ActionItems” sheets with the expected columns.
- Connect your Gmail OAuth2 credentials and update the recipient addresses used for the postmortem email and the weekly digest email.
- 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.
- Review the weekly schedule (cron) and timezone settings and adjust them to match when you want follow-up reminders to run.