Templates / AI-powered document chat with Nextcloud files using LangChain and OpenAI

AI-powered document chat with Nextcloud files using LangChain and OpenAI

Needs changes

by johappel · 2,434 views · created 2025-05-28 · Internal Wiki, AI RAG

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What to replace before upgrading

Removed in 3.0Replace 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.

Community nodes

These come from third-party npm packages. In n8n 3.0 unverified community packages are off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).

Nodes used (14)

OpenAI Chat ModelSimple MemoryAI AgentNextcloudCall n8n Workflow

What it does

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 context. Purpose: Answers questions about files stored in a Nextcloud folder. The user simply includes the folder path in their question. Tool integration: Calls the sub-workflow “Nextcloud Tool” whenever it needs to read files and pass their text back to the AI. --- Sub-Workflow “Nextcloud Tool” 1. Invocation: Triggered by other workflows with the input parameter path (folder path). 2. File listing: Retrieves every file in the specified folder via the Nextcloud API. 3. Filter: Allows only readable formats (PDF, Markdown, DOCX). 4. Download & text extraction PDF → Text via Extract From File Markdown → Raw text DOCX → Text via community node word2text 5. Aggregation: Combines all extracted text into a single output field and returns it. > Outcome: Each call yields the plain content of every supported file in a Nextcloud folder—providing rich context for the AI agent to answer user questions accurately.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.