workflows/Tunrda-Agent.json

347 lines
12 KiB
JSON

{
"createdAt": "2025-11-03T05:52:50.096Z",
"updatedAt": "2025-11-06T07:09:04.000Z",
"id": "Gv1K2TT3mFsk78a1",
"name": "Tunrda-Agent",
"active": false,
"isArchived": false,
"nodes": [
{
"parameters": {
"formTitle": "Upload your data to test RAG",
"formFields": {
"values": [
{
"fieldLabel": "Upload your file(s)",
"fieldType": "file",
"acceptFileTypes": ".pdf, .csv",
"requiredField": true
}
]
},
"options": {}
},
"id": "d0b0c992-3740-4f0f-b7fd-4f3b2c2d48ee",
"name": "Upload your file here",
"type": "n8n-nodes-base.formTrigger",
"position": [
544,
112
],
"webhookId": "82848bc4-5ea2-4e5a-8bb6-3c09b94a8c5d",
"typeVersion": 2.2
},
{
"parameters": {
"options": {}
},
"id": "4fc375d3-e6a5-41e6-9013-62a8023a48e6",
"name": "Embeddings OpenAI",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
896,
576
],
"typeVersion": 1.2,
"credentials": {
"openAiApi": {
"id": "0aLJYVCIXPIQZb1L",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"dataType": "binary",
"options": {
"splitPages": true,
"metadata": {
"metadataValues": [
{
"name": "filename",
"value": "={{ $json['Upload your file(s)'][0].filename }}"
}
]
}
}
},
"id": "6a2dc092-c0fb-4447-aa88-21551898eec4",
"name": "Default Data Loader",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
1056,
304
],
"typeVersion": 1.1
},
{
"parameters": {
"content": "### Readme\nLoad your data into a vector database with the 📚 **Load Data** flow, and then use your data as chat context with the 🐕 **Retriever** flow.\n\n**Quick start**\n1. Click on the `Execute Workflow` button to run the 📚 **Load Data** flow.\n2. Click on `Open Chat` button to run the 🐕 **Retriever** flow. Then ask a question about content from your document(s)\n\n\nFor more info, check our [docs on RAG in n8n](https://docs.n8n.io/advanced-ai/rag-in-n8n/)",
"height": 300,
"width": 440,
"color": 4
},
"id": "c6b85f4f-6e31-4967-ba44-9889625dc193",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
0
],
"typeVersion": 1
},
{
"parameters": {
"content": "### 📚 Load Data Flow",
"height": 460,
"width": 700,
"color": 7
},
"id": "618566c2-66eb-47c7-95ea-49eae760d466",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
480,
0
],
"typeVersion": 1
},
{
"parameters": {
"options": {
"systemMessage": "You are a service assistant for the Toyota Tundra. You should answer questions using the content retrieved from the Qdrant vector database. If additional information is available outside of Qdrant data base, you can use that but must highlight that it is external.\n\nThis Qdrant content is retrieved using the Qdrant vector retrieval tool and provided to you as context for each question.\n\nIf you cannot find a suitable answer within that content, clearly state that the information is not available in the official Tundra Service Manual. You can provide additional information that you have available, but it must be highlighted as from external sources.\n\nIf you choose to include information from outside sources, clearly mark it with a prefix such as \"[External Source]\" and explain that it is not part of the official service manual.\n\nAlways prioritize precision and technical accuracy. Do not hallucinate content. When in doubt, explain that the source does not contain the requested information."
}
},
"id": "e13e2101-7a99-480d-8875-29daa76f8fc9",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1600,
48
],
"typeVersion": 2
},
{
"parameters": {
"options": {}
},
"id": "0f5b3f46-9957-40ea-8f60-a4408f44aa1a",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
1392,
48
],
"webhookId": "4091fa09-fb9a-4039-9411-7104d213f601",
"typeVersion": 1.1
},
{
"parameters": {
"model": {
"__rl": true,
"value": "gpt-4.1",
"mode": "list",
"cachedResultName": "gpt-4.1"
},
"options": {}
},
"id": "e44aa972-dc53-4c0b-acec-2cbd0bf871b2",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1488,
272
],
"typeVersion": 1.2,
"credentials": {
"openAiApi": {
"id": "0aLJYVCIXPIQZb1L",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"content": "### 🐕 2. Retriever Flow",
"height": 460,
"width": 680,
"color": 7
},
"id": "0a20cd13-8387-41ec-96a8-bb0f55a442f2",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1264,
0
],
"typeVersion": 1
},
{
"parameters": {
"content": "### Embeddings\n\nThe Insert and Retrieve operation use the same embedding node.\n\nThis is to ensure that they are using the **exact same embeddings and settings**.\n\nDifferent embeddings might not work at all, or have unintended consequences.\n",
"height": 240,
"width": 320,
"color": 4
},
"id": "b8216591-b2eb-4bc6-bc7e-232fbcf06e4d",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1328,
512
],
"typeVersion": 1
},
{
"parameters": {
"mode": "insert",
"qdrantCollection": {
"__rl": true,
"value": "tundra_manual",
"mode": "list",
"cachedResultName": "tundra_manual"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
"typeVersion": 1.3,
"position": [
832,
112
],
"id": "f5a69d68-41c6-4960-9395-218ed3e49d26",
"name": "Qdrant Vector Store",
"credentials": {
"qdrantApi": {
"id": "BupghMUIxcl7g7Zv",
"name": "QdrantApi account"
}
}
},
{
"parameters": {
"mode": "retrieve-as-tool",
"toolDescription": "This tool allows you to access the Qdrant Vector database for RAG Operations.",
"qdrantCollection": {
"__rl": true,
"value": "tundra_manual",
"mode": "list",
"cachedResultName": "tundra_manual"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
"typeVersion": 1.3,
"position": [
1664,
304
],
"id": "e79c15be-1825-4449-bdc5-e2df88e608cf",
"name": "Qdrant Vector Retrieval",
"credentials": {
"qdrantApi": {
"id": "BupghMUIxcl7g7Zv",
"name": "QdrantApi account"
}
}
}
],
"connections": {
"Upload your file here": {
"main": [
[
{
"node": "Qdrant Vector Store",
"type": "main",
"index": 0
}
]
]
},
"Embeddings OpenAI": {
"ai_embedding": [
[
{
"node": "Qdrant Vector Store",
"type": "ai_embedding",
"index": 0
},
{
"node": "Qdrant Vector Retrieval",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Qdrant Vector Store",
"type": "ai_document",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Qdrant Vector Retrieval": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Qdrant Vector Store": {
"main": [
[]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"pinData": {},
"versionId": "5f87833c-9d8d-445e-8afe-eaed1565912b",
"triggerCount": 0,
"shared": [
{
"createdAt": "2025-11-03T05:52:50.106Z",
"updatedAt": "2025-11-03T05:52:50.106Z",
"role": "workflow:owner",
"workflowId": "Gv1K2TT3mFsk78a1",
"projectId": "oI3LZpkceKxAFXfg"
}
],
"tags": []
}