CIM ingest pipeline
n8n watches a Google Drive folder, Docling converts large PDFs and CIMs to clean Markdown, and the output is ready for agentic ingest or RAG.
What it does
Confidential information memoranda (CIMs) and similar documents are long PDFs full of tables, charts and multi-column layouts. Feeding them straight to a model loses structure and wastes context.
This pipeline turns a dropped PDF into clean, structured Markdown with no manual steps:
- A file lands in a watched Google Drive folder.
- n8n picks it up and sends it to a self-hosted Docling service.
- Docling converts the PDF to Markdown, keeping headings, tables and reading order.
- The Markdown is written back out, ready for an agent to read or for chunking into a RAG index.
Architecture
Stack
- n8n for the Drive trigger, orchestration and retries.
- Docling in a Docker container for PDF-to-Markdown conversion.
- Google Drive as the input and output location.
Demo
Demo coming soon
Repo
Next steps
- Page-referenced extraction of KPIs and risks from the converted Markdown.
- Chunking and embedding into a vector store as an optional final step.
- Handle scanned PDFs with OCR before conversion.