This workflow corresponds to n8n.io template #5858 — we link there as the canonical source.
This workflow follows the Agent → Ollama Chat recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "8fc8fe7b-e0de-4bf6-b87c-2fcb146f66da",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1320,
340
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "ddb2650a-c27e-4e4d-b176-3cb0fd113293",
"name": "Read/Write Files from Disk",
"type": "n8n-nodes-base.readWriteFile",
"position": [
-720,
680
],
"parameters": {},
"typeVersion": 1
},
{
"id": "f7081e2e-29ba-4c3f-ba61-4c0dfada91fb",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-780,
440
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "06bee204-49c1-4c62-8272-ff603e1c6e63",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
120,
480
],
"parameters": {},
"typeVersion": 2
},
{
"id": "1b48e2a6-09a2-4a62-ae15-324881af96a8",
"name": "Ollama Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"position": [
20,
700
],
"parameters": {},
"typeVersion": 1
},
{
"id": "36ef7f39-028a-42a4-8f44-b5eab31046da",
"name": "Local File Trigger",
"type": "n8n-nodes-base.localFileTrigger",
"position": [
-940,
680
],
"parameters": {},
"typeVersion": 1
},
{
"id": "3937fa33-c19b-4755-8119-f3ae8b6b3ce6",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1300,
760
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "b485e613-26d6-443d-9728-7e3ea4431bf5",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
-500,
640
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "14dfd48f-e9f4-474c-9751-714a99a972da",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-540,
340
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "c3f3b7a0-387a-4c31-90aa-7d6535ae1bf8",
"name": "AI Agent1",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
100,
80
],
"parameters": {},
"typeVersion": 2
},
{
"id": "b41b7504-9592-4718-8309-6a3ab4d8c0a4",
"name": "Ollama Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"position": [
20,
300
],
"parameters": {},
"typeVersion": 1
},
{
"id": "559f2df4-6784-4f07-a214-0dfde3838e50",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-160,
-40
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "b93389c0-0781-4365-a8e5-fa816484d846",
"name": "AI Agent2",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
220,
960
],
"parameters": {},
"typeVersion": 2
},
{
"id": "8b44acb7-914f-4daa-a757-9446eef58dbf",
"name": "Ollama Chat Model2",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"position": [
200,
1220
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a0cbe628-023a-472d-b44a-7d5812dd594f",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
180,
300
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "517ac3a2-4f5b-4e88-bd76-76c7bff3d33b",
"name": "Extract from PDF",
"type": "n8n-nodes-base.extractFromFile",
"position": [
-140,
580
],
"parameters": {},
"typeVersion": 1
},
{
"id": "0dc98958-324c-42d0-bac3-f9cb74310d7d",
"name": "Extract from XLS",
"type": "n8n-nodes-base.extractFromFile",
"position": [
-140,
800
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c30a13c2-32c0-4b57-b25f-2c300e831170",
"name": "Extract from CSV",
"type": "n8n-nodes-base.extractFromFile",
"position": [
-140,
1040
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c0deb047-bfa6-4802-984a-f7aae52ee4b9",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-180,
360
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "5a8a0dd8-6f1a-4494-8664-307a3e2da30f",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
140,
700
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "d3f938d8-6ba5-4f15-b991-bdf8ff54960e",
"name": "Convert to File",
"type": "n8n-nodes-base.convertToFile",
"position": [
680,
600
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "b4533061-af36-46c7-90c8-38bd752eb888",
"name": "Read/Write Files from Disk1",
"type": "n8n-nodes-base.readWriteFile",
"position": [
900,
600
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c4d0c3e7-ba1c-4fc4-8fa5-12c05178a14b",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
620,
380
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "2cfcdb84-0f36-442a-a2fa-43aaf17317bd",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1300,
60
],
"parameters": {
"content": ""
},
"typeVersion": 1
}
],
"connections": {
"Switch": {
"main": [
[
{
"node": "AI Agent1",
"type": "main",
"index": 0
}
],
[
{
"node": "AI Agent1",
"type": "main",
"index": 0
}
],
[
{
"node": "Extract from PDF",
"type": "main",
"index": 0
}
],
[
{
"node": "Extract from XLS",
"type": "main",
"index": 0
}
],
[
{
"node": "Extract from CSV",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Convert to File",
"type": "main",
"index": 0
}
]
]
},
"AI Agent1": {
"main": [
[
{
"node": "Convert to File",
"type": "main",
"index": 0
}
]
]
},
"AI Agent2": {
"main": [
[
{
"node": "Convert to File",
"type": "main",
"index": 0
}
]
]
},
"Convert to File": {
"main": [
[
{
"node": "Read/Write Files from Disk1",
"type": "main",
"index": 0
}
]
]
},
"Extract from CSV": {
"main": [
[
{
"node": "AI Agent2",
"type": "main",
"index": 0
}
]
]
},
"Extract from PDF": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Extract from XLS": {
"main": [
[
{
"node": "AI Agent2",
"type": "main",
"index": 0
}
]
]
},
"Ollama Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Local File Trigger": {
"main": [
[
{
"node": "Read/Write Files from Disk",
"type": "main",
"index": 0
}
]
]
},
"Ollama Chat Model1": {
"ai_languageModel": [
[
{
"node": "AI Agent1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Ollama Chat Model2": {
"ai_languageModel": [
[
{
"node": "AI Agent2",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Read/Write Files from Disk": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Tutorial Video
Source: https://n8n.io/workflows/5858/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
🔥📈🤖 AI Agent for n8n Creators Leaderboard - Find Popular Workflows. Uses httpRequest, limit, lmChatOpenAi, executeWorkflowTrigger. Event-driven trigger; 43 nodes.
🔥📈🤖 AI Agent for n8n Creators Leaderboard - Find Popular Workflows. Uses httpRequest, limit, lmChatOpenAi, executeWorkflowTrigger. Event-driven trigger; 43 nodes.
The n8n Creators Leaderboard Workflow is a powerful tool for analyzing and presenting detailed statistics about workflow creators and their contributions within the n8n community. It provides users wi
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
Reconcile Rent Payments With Local Excel Spreadsheet And Openai. Uses localFileTrigger, toolCode, outputParserStructured, readWriteFile. Event-driven trigger; 17 nodes.