n8n · No code
Build a research agent with n8n
Build a research workflow in n8n by wiring the unlob HTTP endpoint into an AI Agent node — no code, and schedulable.
What you are building
Trigger
Schedule
Every 6 hours
The agent
AI Agent node
Runs the tool loop
Anthropic Chat Model
claude-opus-5
HTTP Request Tool
unlob search
Output
Slack
Or email, sheet, database
Install
Runs on n8n Cloud, or on your own Docker instance. No packages to install.Already have n8n wired up? Then8n integration pagehas the connection config on its own — this page assumes you have it and gets on with building.
Step by step
Store the key as a credential
Create a Header Auth credential with name `x-api-key` and your key as the value. Never paste the key into a node parameter — credentials are encrypted and are not included when you export a workflow.
Add an HTTP Request tool
Add an AI Agent node, then attach an HTTP Request Tool to it. The description you write is what the model reads when deciding whether to call it, so it matters more than it looks.
HTTP Request Tool nodejson { "name": "unlob_search", "description": "Search the web on unlob's own index. Returns metadata only — url, title, snippet and independent_sources. Never returns page bodies. Set min_independent_sources to 3 for factual claims.", "method": "GET", "url": "https://api.unlob.com/search", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendQuery": true, "queryParameters": { "parameters": [ { "name": "q", "value": "={{ $fromAI('query', 'What to search for', 'string') }}" }, { "name": "min_independent_sources", "value": "={{ $fromAI('min_sources', 'Independent sources required', 'number', 2) }}" }, { "name": "limit", "value": "8" } ] } }Schedule it
Put a Schedule Trigger in front and a Slack or email node behind, and you have a monitoring workflow that runs itself. This is the shape n8n is genuinely best at.
What happens when it runs
The whole thing
Complete and runnable. Set the two environment variables and it works.
{
"name": "unlob research agent",
"nodes": [
{
"parameters": { "rule": { "interval": [{ "field": "hours", "hoursInterval": 6 }] } },
"name": "Every 6 hours",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [200, 300]
},
{
"parameters": {
"promptType": "define",
"text": "Research what changed in EU AI Act GPAI rules this week. Prefer claims carried by several independent sources, and say so when a claim rests on one. Cite URLs.",
"options": { "systemMessage": "You are a research assistant. Search before you answer." }
},
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [460, 300]
},
{
"parameters": { "model": "claude-opus-5" },
"name": "Anthropic Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [400, 500]
},
{
"parameters": {
"toolDescription": "Search the web on unlob's own index. Returns metadata only — url, title, snippet and independent_sources. Never returns page bodies.",
"url": "https://api.unlob.com/search",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendQuery": true,
"queryParameters": {
"parameters": [
{ "name": "q", "value": "={{ $fromAI('query', 'What to search for', 'string') }}" },
{ "name": "min_independent_sources", "value": "3" },
{ "name": "limit", "value": "8" }
]
}
},
"name": "unlob search",
"type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
"position": [600, 500]
},
{
"parameters": { "select": "channel", "text": "={{ $json.output }}" },
"name": "Post to Slack",
"type": "n8n-nodes-base.slack",
"position": [760, 300]
}
],
"connections": {
"Every 6 hours": { "main": [[{ "node": "AI Agent", "type": "main", "index": 0 }]] },
"Anthropic Chat Model": { "ai_languageModel": [[{ "node": "AI Agent", "type": "ai_languageModel", "index": 0 }]] },
"unlob search": { "ai_tool": [[{ "node": "AI Agent", "type": "ai_tool", "index": 0 }]] },
"AI Agent": { "main": [[{ "node": "Post to Slack", "type": "main", "index": 0 }]] }
}
}What will go wrong
The failures that cost an afternoon rather than a minute, because they produce something that looks like it is working.
Use a Header Auth credential rather than typing the key into the URL or a parameter. Credentials are encrypted and are excluded from workflow exports — a key pasted into a node travels with the JSON when you share it.
`$fromAI()` is what lets the model fill a parameter. A hard-coded query value produces a tool that runs the same search every time and an agent that appears to ignore the question.
The tool description is the only thing the model sees. "Search the web" gets you a tool that is called for everything; describing what it returns and when to use it is what makes the agent selective.
Pin `min_independent_sources` in the node rather than exposing it to the model when you want a guaranteed corroboration floor. Anything left to $fromAI is a suggestion the model can lower.
Where this agent can go next
Every result the agent receives is a node in the coverage graph. These are the tools you can add to it without leaving n8n — each is one more entry in the same tools list.
Frequently asked questions
Do I need the MCP server for n8n?
No. The HTTP Request Tool node calls the REST API directly, which is fewer moving parts in a hosted n8n instance. MCP is the better fit for desktop agent clients.
Can I run this on a schedule without an AI model at all?
Yes, and often you should. If the job is "search this query every hour and post new results", a Schedule Trigger, an HTTP Request node and a filter do it deterministically and for no model cost. Add the agent only when something genuinely needs judgement.
You need a key to run this
10,000 requests a month on the free tier, no card. Enough to build the agent and put a real evaluation set through it.