Ingest and index Nextcloud documents for RAG with Mistral OCR and Postgres
Ready for 3.0What this workflow does
This workflow has 34 nodes and runs on a schedule (every 50 minutes). Along the way it connects Postgres and Nextcloud. It also calls api.mistral.ai over HTTP.
How it runs
Trigger: On a schedule (every 50 minutes).
- Configuration (Code): runs custom JavaScript code
- Lister A_classer (Nextcloud): list (folder)
- Choisir un fichier (Code): runs custom JavaScript code
- Réserver le fichier (Nextcloud): move
- Télécharger (Nextcloud): download
- Encoder en base (Extract from File): extracts data from a file (binary to propery)
- Empreinte SHA- (Crypto): hashes or encrypts values
- Préparer le fichier (Code): runs custom JavaScript code
- Format pris en charge ? (If): checks a condition and branches into true / false
- Déjà indexé ? (Postgres): run a query
…plus 23 more steps. See the full node list below.
Services it uses
Other PostgreSQL + Mistral AI templates (6)
HTTP calls to: api.mistral.ai
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (11)
- Code
n8n-nodes-base.code - Extract from File
n8n-nodes-base.extractFromFile - Crypto
n8n-nodes-base.crypto - If
n8n-nodes-base.if - Postgres
n8n-nodes-base.postgres - HTTP Request
n8n-nodes-base.httpRequest - Send Email
n8n-nodes-base.emailSend - Wait
n8n-nodes-base.wait - Execute Sub-workflow
n8n-nodes-base.executeWorkflow - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Nextcloud
n8n-nodes-base.nextCloud
From the author
Quick overview This workflow polls a Nextcloud folder, OCRs newly uploaded documents with Mistral, extracts normalized metadata with Mistral Chat Completions, and stores the results in Postgres before moving the file into the appropriate Nextcloud archive…