使用Couchbase向量搜索、Gemini 2.0 Flash和OpenAI的旅行规划代理
中级
这是一个Other、AI领域的自动化工作流,包含 13 个节点。主要使用 Webhook、Agent、VectorStoreCouchbaseSearch、ChatTrigger、EmbeddingsOpenAi 等节点,结合人工智能技术实现智能自动化。 使用Couchbase向量搜索、Gemini 2.0 Flash和OpenAI的旅行规划代理
前置要求
- •HTTP Webhook 端点(n8n 会自动生成)
- •OpenAI API Key
- •Google Gemini API Key
使用的节点 (13 个)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "iGAzT789R7Q1fOOE",
"meta": {
"instanceId": "7a1e9dd164c758cbdeb7cf88274e567a937a36ed99d4d22ff24b645841097c48",
"templateId": "3577",
"templateCredsSetupCompleted": true
},
"name": "使用 Couchbase 向量搜索、Gemini 2.0 Flash 和 OpenAI 的旅行规划代理",
"tags": [],
"nodes": [
{
"id": "0f361616-a552-43ed-9754-794780113955",
"name": "当收到聊天消息时",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
380,
240
],
"webhookId": "c22b2240-ff07-44e5-a1aa-63584150a1cb",
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "e8b9815d-0fe5-4e7c-a20b-1602384580cd",
"name": "Google Gemini聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
560,
480
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.0-flash"
},
"typeVersion": 1
},
{
"id": "a4b15997-de4d-4c78-b623-e936442134af",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
1260,
280
],
"parameters": {
"color": 3,
"width": 800,
"height": 500,
"content": "## 由 Couchbase 驱动的 AI 旅行代理"
},
"typeVersion": 1
},
{
"id": "34866f8e-00b0-4706-82d7-491b9531a8b6",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
800,
1000
],
"webhookId": "3ca6fbdd-a157-4e9d-9042-237048da85b6",
"parameters": {
"path": "3ca6fbdd-a157-4e9d-9042-237048da85b6",
"options": {
"rawBody": true
},
"httpMethod": "POST"
},
"typeVersion": 2
},
{
"id": "26d4e62a-42b0-4e09-8585-827e5bcc9fff",
"name": "默认数据加载器",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
1180,
1360
],
"parameters": {
"options": {},
"jsonData": "={{ $json.body.raw_body.point_of_interest.title }} - {{ $json.body.raw_body.point_of_interest.description }}",
"jsonMode": "expressionData"
},
"typeVersion": 1
},
{
"id": "63fc308f-4d1c-4d24-9b20-68d7e6c2dbba",
"name": "递归字符文本分割器",
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"position": [
1280,
1540
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "84f8c32b-8e0c-457c-aaec-17827042674d",
"name": "便签 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-60,
1060
],
"parameters": {
"width": 720,
"height": 460,
"content": "## 用于摄取数据的 CURL 命令"
},
"typeVersion": 1
},
{
"id": "b2cf8788-849c-4420-b448-bd49caa4941e",
"name": "简单记忆",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
720,
480
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "0bf7fef9-f999-42a8-a6a8-ab111fe9a084",
"name": "AI 旅行代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
600,
240
],
"parameters": {
"options": {
"maxIterations": 10,
"systemMessage": "You are a helpful assistant for a trip planner. You have a vector search capability to locate points of interest, Use it and don't invent much."
}
},
"typeVersion": 1.8
},
{
"id": "3af3c8ce-582b-407c-847a-8063f9ad2e1a",
"name": "使用 Couchbase 搜索向量检索文档",
"type": "n8n-nodes-couchbase.vectorStoreCouchbaseSearch",
"position": [
860,
500
],
"parameters": {
"mode": "retrieve-as-tool",
"topK": 10,
"options": {},
"toolName": "PointofinterestKB",
"embedding": "embedding",
"textFieldKey": "description",
"couchbaseScope": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": ""
},
"couchbaseBucket": {
"__rl": true,
"mode": "list",
"value": ""
},
"toolDescription": "The list of Points of Interest from the database.",
"vectorIndexName": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": ""
},
"couchbaseCollection": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": ""
}
},
"typeVersion": 1.1
},
{
"id": "77a4e857-607a-4bbc-a28d-8a715f9415d5",
"name": "使用 Couchbase 搜索向量插入文档",
"type": "n8n-nodes-couchbase.vectorStoreCouchbaseSearch",
"position": [
1100,
1120
],
"parameters": {
"mode": "insert",
"options": {},
"embedding": "embedding",
"textFieldKey": "description",
"couchbaseScope": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": ""
},
"couchbaseBucket": {
"__rl": true,
"mode": "list",
"value": ""
},
"vectorIndexName": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": ""
},
"embeddingBatchSize": 1,
"couchbaseCollection": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": ""
}
},
"typeVersion": 1.1
},
{
"id": "4c0274c3-6647-4f45-b7d4-d63cfe2102ea",
"name": "使用 text-embedding-3-small 生成 OpenAI 嵌入",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
960,
740
],
"parameters": {
"options": {}
},
"typeVersion": 1.2
},
{
"id": "83f864fa-a298-4738-a102-ca2d283377de",
"name": "使用 text-embedding-3-small1 生成 OpenAI 嵌入",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
1000,
1340
],
"parameters": {
"options": {}
},
"typeVersion": 1.2
}
],
"active": true,
"pinData": {},
"settings": {
"callerPolicy": "workflowsFromSameOwner",
"executionOrder": "v1"
},
"versionId": "80e40e5a-35a3-4fa4-b90e-ac9d76897bbd",
"connections": {
"Webhook": {
"main": [
[
{
"node": "Insert docs with Couchbase Search Vector",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Travel Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Insert docs with Couchbase Search Vector",
"type": "ai_document",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Travel Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "AI Travel Agent",
"type": "main",
"index": 0
}
]
]
},
"Recursive Character Text Splitter": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"Retrieve docs with Couchbase Search Vector": {
"ai_tool": [
[
{
"node": "AI Travel Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Generate OpenAI Embeddings using text-embedding-3-small": {
"ai_embedding": [
[
{
"node": "Retrieve docs with Couchbase Search Vector",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Generate OpenAI Embeddings using text-embedding-3-small1": {
"ai_embedding": [
[
{
"node": "Insert docs with Couchbase Search Vector",
"type": "ai_embedding",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个中级难度的工作流,适用于Other、AI等场景。适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
旅行助手Agent
使用MongoDB Atlas、Gemini LLM和向量搜索的旅行规划助手
Webhook
Agent
Chat Trigger
+7
14 节点Pavel Duchovny
Other
⚡AI驱动的YouTube播放列表和视频摘要与分析v2
AI YouTube播放列表与视频分析聊天机器人
If
Set
Code
+20
72 节点dmr
Other
AI智能助手:与Supabase存储和Google Drive文件对话
AI智能助手:与Supabase存储和Google Drive文件对话
If
Set
Wait
+20
62 节点Mark Shcherbakov
Engineering
高级AI演示(在AI开发者第14次聚会中展示)
高级AI演示(在AI开发者第14次聚会中展示)
If
Code
Gmail
+19
39 节点Max Tkacz
Building Blocks
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
Other
🤖 面向您的文档+Google Drive+Gemini+Qdrant的AI驱动RAG聊天机器人
🤖 面向您的文档+Google Drive+Gemini+Qdrant的AI驱动RAG聊天机器人
If
Set
Wait
+21
50 节点Joseph LePage
AI