AI-powered document chat with Nextcloud files using LangChain and OpenAI
Needs changesWhat this workflow does
This AI workflow has 19 nodes and runs when a chat message arrives (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Nextcloud and Word2text (community).
How it runs
Trigger: When a chat message arrives (plus 1 other trigger).
- AI Nextcloud (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 1 tool (Nextcloud Tool); memory: Simple Memory
- test data (Code): runs custom JavaScript code
- Get Files (Nextcloud): list (folder)
- If: checks a condition and branches into true / false
- Download File (Nextcloud): download
- Switch: routes items into 3 branches
- PDF (Extract from File): extracts data from a file (pdf)
- Markdown (Extract from File): extracts data from a file (text)
- DOCX (Word2text): uses Word2text
- add path (Code): runs custom JavaScript code
…plus 4 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Nextcloud (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Nextcloud (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (14)
- Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - AI Agent
@n8n/n8n-nodes-langchain.agent - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Switch
n8n-nodes-base.switch - Aggregate
n8n-nodes-base.aggregate - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Nextcloud
n8n-nodes-base.nextCloud - Code
n8n-nodes-base.code - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - Extract from File
n8n-nodes-base.extractFromFile - Word2text
n8n-nodes-word2text.word2text
From the author
Main Workflow “AI Nextcloud” Entry point: A public chat-trigger greets the user; every incoming chat message starts the flow. AI agent: A LangChain agent (“AI Nextcloud”) uses the configured OpenAI model plus short-term memory to continue the dialogue in…