Generate incident response reports with Supabase, Gemini and Claude
Needs changesNeeds changes. This template uses 2 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes), Supabase: Insert. 2 breaking item(s) found. Static check, last run 2026-10-19.
What to replace before upgrading
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Historical Incidents RAG Agent (v1.7), Playbook Routing Agent (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
| Supabase: Insert Supabase Vector Insert (Resolved Incidents), Supabase Vector Insert (Playbooks Ingestion) | Supabase Vector Store (Insert Documents) |
Community nodes
These come from third-party npm packages. In n8n 3.0 unverified community packages are off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
@tavily/n8n-nodes-tavily(Search in Tavily)
Rarely used nodes in this template: @n8n/n8n-nodes-langchain.vectorStoreSupabaseInsert
Nodes used (20)
- Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Embeddings Google Gemini
@n8n/n8n-nodes-langchain.embeddingsGoogleGemini - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Supabase
n8n-nodes-base.supabase - Merge
n8n-nodes-base.merge - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - AI Agent
@n8n/n8n-nodes-langchain.agent - Tavily Tool
@tavily/n8n-nodes-tavily.tavilyTool - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Supabase: Insert
@n8n/n8n-nodes-langchain.vectorStoreSupabaseInsert - Wait
n8n-nodes-base.wait - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - No Operation, do nothing
n8n-nodes-base.noOp - Webhook
n8n-nodes-base.webhook
What it does
Quick Overview This workflow ingests incident and playbook content from GitHub into Supabase (including pgvector embeddings with Google Gemini) and, on a webhook trigger, enriches a test incident with historical matches, a routed response playbook, and live web threat intel (via Tavily + OpenRouter) to generate a validated incident response report. How it works 1. Receives a POST webhook containing the incident payload (including an encrypted OpenRouter API key) and decrypts the key for downstream LLM calls. 2. Creates a tracking row in a Supabase table and loads configuration values used by the retrieval and report-generation steps. 3. Retrieves similar resolved incidents from a Supabase pgvector store using Google Gemini embeddings and returns structured historical patterns. 4. Retrieves the best-matching reference playbook from a Supabase pgvector store and fetches the full playbook text from Supabase, falling back to a built-in generic playbook when no match is found. 5. Uses Tavily Search plus an OpenRouter-backed agent to gather external threat intelligence, IOCs, and phased mitigation guidance when the incident is classified as security-relevant. 6. Merges the three intelligence branches and uses an OpenRouter LLM to synthesize a structured JSON output and an 11-section Markdown incident response report. 7. Validates that required report fields exist and, if valid, writes the structured output and Markdown report back to the Supabase test incident record; otherwise it skips the write. Setup 1. Create Supabase tables for test incidents and vector stores (for resolved incidents and reference playbooks) and configure the matching SQL functions used for retrieval (for example, matchresolvedincidentsv1 and matchreferenceplaybooksv1). 2. Add Supabase credentials in n8n and set the correct table names and query function names in the workflow’s configuration nodes. 3. Add Google Gemini (PaLM) API credentials and ensure the embedding model name used in the config (for example, models/gemini-embedding-001) is available to your account. 4. Add an OpenRouter API credential for the chat models used by the agents and synthesizer, and ensure your webhook caller sends an encryptedopenrouterkey value that matches the workflow’s decryption format. 5. Add a Tavily API credential for web search, then copy the webhook URL and configure your incident source to POST the incident JSON to it.