搜索网页的聊天机器人
中级
这是一个Building Blocks, AI, IT Ops领域的自动化工作流,包含 7 个节点。主要使用 SearchApiTool, Agent, ChatTrigger, LmChatOpenRouter, MemoryBufferWindow 等节点,结合人工智能技术实现智能自动化。 基于SearchAPI和OpenRouter LLM的带引用网络搜索助手
前置要求
- •AI 服务 API Key(如 OpenAI、Anthropic 等)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "onyc3N5GKCxzWfmi",
"meta": {
"instanceId": "54299f860163fe60974599588ae4c20ee888191a431346b258503c2db8b536ed",
"templateCredsSetupCompleted": true
},
"name": "搜索网页的聊天机器人",
"tags": [],
"nodes": [
{
"id": "976aa8a4-d286-478a-8cc9-4577e220174b",
"name": "当收到聊天消息时",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-300,
80
],
"webhookId": "d48f9e07-3c05-4be8-86ca-5cee4c27b78f",
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "44236749-af9f-4843-a1ab-e54008b4c525",
"name": "简单记忆",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
40,
300
],
"parameters": {
"contextWindowLength": 20
},
"typeVersion": 1.3
},
{
"id": "33536ea4-c8fe-4525-a2d2-905180259e8d",
"name": "AI 代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-48,
80
],
"parameters": {
"options": {}
},
"typeVersion": 1.8
},
{
"id": "10436a1a-4993-4fc5-aca7-686db5bf7441",
"name": "OpenRouter聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
-80,
300
],
"parameters": {
"model": "deepseek/deepseek-chat:free",
"options": {}
},
"credentials": {
"openRouterApi": {
"id": "tDWBerCVn0gOn7YX",
"name": "OpenRouter account"
}
},
"typeVersion": 1
},
{
"id": "73d024bd-aab3-491c-afc4-79194f4ac7fc",
"name": "SearchAPI",
"type": "CUSTOM.searchApiTool",
"position": [
260,
300
],
"parameters": {
"parameters": {
"parameter": [
{
"name": "q",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Value', ``, 'string') }}"
},
{}
]
},
"requestOptions": {},
"toolDescription": "Call this tool whenever the answer might require fresh, niche, or externally-verifiable information. Make sure to always cite the sources in the final reply. "
},
"credentials": {
"searchApi": {
"id": "rTFvdffzP7fPVaVr",
"name": "SearchAPI account"
}
},
"typeVersion": 1
},
{
"id": "7443e1c1-1b12-453d-89b3-9875ed07749f",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-400,
-140
],
"parameters": {
"color": 5,
"width": 340,
"content": "## SearchAPI AI 代理"
},
"typeVersion": 1
},
{
"id": "9617510c-6ff3-4f6c-9e4d-8fbd9b129f95",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
460,
400
],
"parameters": {
"width": 260,
"height": 120,
"content": "## 提示"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "1f42e7e2-32ca-4ceb-8f1e-1de26f09d525",
"connections": {
"SearchAPI": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"OpenRouter Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 构建模块, 人工智能, IT 运维
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
ozki: OpenAI CSV分析
使用OpenAI驱动的数据代理分析Google Sheets数据
Agent
Google Sheets Tool
Chat Trigger
+3
6 节点ozkary
工程
使用Airtable构建MCP服务器
使用Airtable构建MCP服务器
Airtable Tool
Agent
Mcp Trigger
+5
13 节点Aitor | 1node.ai
构建模块
使用OpenRouter的自动化AI路由
通过OpenRouter实现查询优化的动态AI模型路由
Agent
Chat Trigger
Lm Chat Open Router
+2
7 节点Davide
工程
我的工作流 4
使用 Groq AI 聊天机器人通过自然语言查询 PostgreSQL 数据库
Postgres Tool
Agent
Lm Chat Groq
+3
11 节点Gegenfeld
构建模块
基于文档的带记忆聊天机器人,使用 OpenAI、Pinecone 和 Google Drive
基于文档的带记忆聊天机器人,使用 OpenAI、Pinecone 和 Google Drive
Merge
Airtable
Aggregate
+15
22 节点Sally
人工智能
多代理对话
使用 @提及 的可扩展多代理聊天
If
Set
Code
+6
18 节点Jon Doran
构建模块
工作流信息
难度等级
中级
节点数量7
分类3
节点类型6
作者
Pedro Santos
@dapeduI'm a software developer with over 4+ years of experience. I work using software to solve clients problems and I believe n8n is a nice way to solve some problems faster!
外部链接
在 n8n.io 查看 →
分享此工作流