AI-Powered Document Chat with Nextcloud Files using LangChain and OpenAI
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”
Invocation: Triggered by other workflows with the input parameter path (folder path). File listing: Retrieves every file in the specified folder via the Nextcloud API. Filter: Allows only readable formats (PDF, Markdown, DOCX). Download & text extraction
PDF → Text via Extract From File Markdown → Raw text DOCX → Text via community node word2text 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.
Related Templates
Extract Named Entities from Web Pages with Google Natural Language API
Who is this for? Content strategists analyzing web page semantic content SEO professionals conducting entity-based anal...
Add product ideas to Notion via a Slack command
Use Case In most companies, employees have a lot of great ideas. That was the same for us at n8n. We wanted to make it a...
Automate Daily Keyword Research with Google Sheets, Suggest API & Custom Search
Who's it for This workflow is perfect for SEO specialists, marketers, bloggers, and content creators who want to automa...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments