Templates / Ingest and index Nextcloud documents for RAG with Mistral OCR and Postgres

Ingest and index Nextcloud documents for RAG with Mistral OCR and Postgres

Ready for 3.0

by Erwan L. · 0 views · created 2026-11-21 · Document Extraction, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What 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).

  1. Configuration (Code): runs custom JavaScript code
  2. Lister A_classer (Nextcloud): list (folder)
  3. Choisir un fichier (Code): runs custom JavaScript code
  4. Réserver le fichier (Nextcloud): move
  5. Télécharger (Nextcloud): download
  6. Encoder en base (Extract from File): extracts data from a file (binary to propery)
  7. Empreinte SHA- (Crypto): hashes or encrypts values
  8. Préparer le fichier (Code): runs custom JavaScript code
  9. Format pris en charge ? (If): checks a condition and branches into true / false
  10. Déjà indexé ? (Postgres): run a query

…plus 23 more steps. See the full node list below.

Services it uses

PostgresNextcloud

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.

Check at runtime on n8n 3.0
  • Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (11)

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…

Excerpt from Erwan L.'s description on n8n.io.

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.