Generate cited web research reports with SerpAPI, Claude, and Google Docs
Ready for 3.0What this workflow does
This AI workflow has 19 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Anthropic Chat Model, Google Docs, Slack and Postgres. It also calls serpapi.com over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Set Research Workflow Parameters (Edit Fields (Set)): sets 3 fields: confidenceThreshold, serpApiKey, slackChannel
- Planner AI Agent (AI Agent): runs an AI agent, with model: Claude Model for Planning; output parser: Parse Planner Output
- Extract Sub-Questions for Research (Edit Fields (Set)): sets 1 field: subQuestions
- Split Sub-Questions for Parallel Processing (Code): runs custom JavaScript code
- Fetch Search Results from SerpAPI (HTTP Request): calls serpapi.com
- Combine Search Results for Synthesis (Aggregate): combines items into one
- Synthesis AI Agent (AI Agent): runs an AI agent, with model: Claude Model for Synthesis
- Confidence Scoring Agent (AI Agent): runs an AI agent, with model: Claude Model for Confidence Scoring; output parser: Parse Scorer Output
- Check Confidence Threshold (If): checks a condition and branches into true / false
- Create Research Report in Google Docs (Google Docs): uses Google Docs
…plus 3 more steps. See the full node list below.
Services it uses
HTTP calls to: serpapi.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (12)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - AI Agent
@n8n/n8n-nodes-langchain.agent - Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Aggregate
n8n-nodes-base.aggregate - If
n8n-nodes-base.if - Google Docs
n8n-nodes-base.googleDocs - Slack
n8n-nodes-base.slack - Postgres
n8n-nodes-base.postgres
From the author
Quick overview This workflow accepts a research query via webhook, breaks it into sub-questions with Anthropic Claude, gathers web results via SerpAPI, synthesizes a cited report, scores confidence, and then saves the report to Google Docs, notifies Slack,…