Web research AI agent
Ask a question; it searches the web, reads the best sources, and writes a short brief with links.
How it works
- You ask a question in the chat.
- The agent plans several searches and runs them.
- It reads the most relevant pages.
- It writes a brief with key findings and the sources it actually read — and saves it to Notion if you ask.
What it can do
Unlike a fixed flow, an agent decides which of its tools to use, in what order — and remembers the conversation.
- Breaks a question into several web searches
- Reads the full text of the best sources
- Writes a brief: answer first, then findings and sources
- Saves reports to Notion on request
System prompt
The instructions that shape the agent. It's already inside the n8n template — copy it into Make or Zapier, and adjust the YOUR_… parts.
You are a research assistant. Today is {{ $now.toFormat('d LLLL yyyy') }}.
When the user asks a question:
1. Break it into 2–4 search queries and use "Search the web" for each.
2. Use "Read web page" on the 3–5 most relevant, trustworthy results.
3. Write a brief: a 2-sentence answer first, then key findings as bullet points, then a "Sources" list with the URLs you actually read.
Rules:
- Only state facts you found in the sources. If sources disagree or you couldn't find something, say so.
- Never invent sources, numbers or quotes.
- Use "Save report" only when the user asks to save it.Safety rules
Built into the prompt and the tools:
- Only states facts found in the sources it read
- Lists real source URLs — never invented ones
- Says clearly when it couldn't find something
Uses your own AI key (Claude, OpenAI or another model). Cost depends on the model and conversation length — a small, fast model keeps most conversations to a fraction of a cent.
Diagram
Build it
Pick your tool — same automation, step by step.
Copy and paste straight into an n8n canvas (Ctrl+V), or download and use Import from File. Then connect your own credentials and replace every YOUR_… placeholder. AI steps use a Claude model node — swap it for OpenAI, Gemini or Ollama if you prefer.
Show code (223 lines)
{
"name": "Web research AI agent (Flowngn)",
"nodes": [
{
"parameters": {
"content": "## Web research AI agent\nAsk a question; it searches the web, reads the best sources, and writes a short brief with links.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
"height": 260,
"width": 340
},
"id": "47157a09-d134-43d4-afa3-3abc9d4f5960",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"public": true,
"mode": "hostedChat",
"initialMessages": "What would you like me to research?",
"options": {
"responseMode": "lastNode"
}
},
"id": "47157a09-d134-43d4-afa3-3abc9d4f5960",
"name": "Research chat",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1.1,
"position": [
0,
0
],
"webhookId": "47157a09-d134-43d4-afa3-3abc9d4f5960"
},
{
"parameters": {
"options": {
"systemMessage": "=You are a research assistant. Today is {{ $now.toFormat('d LLLL yyyy') }}.\n\nWhen the user asks a question:\n1. Break it into 2–4 search queries and use \"Search the web\" for each.\n2. Use \"Read web page\" on the 3–5 most relevant, trustworthy results.\n3. Write a brief: a 2-sentence answer first, then key findings as bullet points, then a \"Sources\" list with the URLs you actually read.\n\nRules:\n- Only state facts you found in the sources. If sources disagree or you couldn't find something, say so.\n- Never invent sources, numbers or quotes.\n- Use \"Save report\" only when the user asks to save it."
}
},
"id": "47157a09-d134-43d4-afa3-3abc9d4f5960",
"name": "Research agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.9,
"position": [
300,
0
]
},
{
"parameters": {
"model": {
"__rl": true,
"value": "claude-sonnet-5",
"mode": "list"
},
"options": {}
},
"id": "47157a09-d134-43d4-afa3-3abc9d4f5960",
"name": "Claude model",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"typeVersion": 1.3,
"position": [
-40,
220
]
},
{
"parameters": {
"contextWindowLength": 10
},
"id": "47157a09-d134-43d4-afa3-3abc9d4f5960",
"name": "Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
130,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Searches Google and returns the top results.",
"options": {}
},
"id": "47157a09-d134-43d4-afa3-3abc9d4f5960",
"name": "Search the web",
"type": "@n8n/n8n-nodes-langchain.toolSerpApi",
"typeVersion": 1,
"position": [
300,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Fetches a web page and returns its text, so you can read a source.",
"url": "={{ $fromAI('url', \"The full URL of the page to read\", 'string') }}",
"options": {}
},
"id": "47157a09-d134-43d4-afa3-3abc9d4f5960",
"name": "Read web page",
"type": "n8n-nodes-base.httpRequestTool",
"typeVersion": 4.2,
"position": [
470,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Saves the finished brief as a page in Notion. Only use when the user asks.",
"resource": "databasePage",
"operation": "create",
"databaseId": {
"__rl": true,
"value": "YOUR_RESEARCH_DATABASE_ID",
"mode": "id"
},
"title": "={{ $fromAI('title', \"Report title\", 'string') }}",
"blockUi": {
"blockValues": [
{
"type": "paragraph",
"textContent": "={{ $fromAI('report', \"The full brief, including the sources list\", 'string') }}"
}
]
},
"options": {}
},
"id": "47157a09-d134-43d4-afa3-3abc9d4f5960",
"name": "Save report",
"type": "n8n-nodes-base.notionTool",
"typeVersion": 2.2,
"position": [
640,
220
]
}
],
"connections": {
"Research chat": {
"main": [
[
{
"node": "Research agent",
"type": "main",
"index": 0
}
]
]
},
"Claude model": {
"ai_languageModel": [
[
{
"node": "Research agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Memory": {
"ai_memory": [
[
{
"node": "Research agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Search the web": {
"ai_tool": [
[
{
"node": "Research agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Read web page": {
"ai_tool": [
[
{
"node": "Research agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Save report": {
"ai_tool": [
[
{
"node": "Research agent",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": []
}In Make, create a new scenario and add these modules in order:
- Webhooks › Custom webhook — called by your website's chat widget
- Make AI Agents › Run an agent — give it these tools: “Search the web” (SerpApi), “Read web page” (HTTP), “Save report” (Notion); paste the system prompt as the agent's instructions
- Every module run uses Make operations — the free plan includes a monthly quota.
- Module and step names can differ slightly as Make and Zapier update their apps.
In Zapier, create a new Zap and add these steps in order:
- Zapier Chatbots, or Webhooks by Zapier — Catch Hook from your chat widget
- Zapier Agents — create an agent (or AI by Zapier for a single step) — give it these tools: “Search the web” (SerpApi), “Read web page” (Webhooks by Zapier), “Save report” (Notion); paste the system prompt as the agent's instructions
- Zaps with more than two steps need a paid Zapier plan.
- Module and step names can differ slightly as Make and Zapier update their apps.
Tips
- SerpAPI has a free monthly allowance; you can swap it for another search tool.
Related flows
Inbox assistant AI agent
Reads each new email and decides: draft a reply, create a task, alert you — or ignore it.
Meeting notes → actions AI agent
Paste your meeting notes; the agent creates tasks with owners, drafts the follow-up email and posts a summary.
Social media content calendar AI agent
Plans a week of posts in Arabic and English from your brand guide, checks what's trending, and saves them to your content calendar.