Project

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.

Date
Status
active
  • n8n
  • Docling
  • Google Drive
  • PDF
  • Markdown
  • RAG
  • Docker

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:

  1. A file lands in a watched Google Drive folder.
  2. n8n picks it up and sends it to a self-hosted Docling service.
  3. Docling converts the PDF to Markdown, keeping headings, tables and reading order.
  4. The Markdown is written back out, ready for an agent to read or for chunking into a RAG index.

Architecture

CIM ingest pipelineA PDF dropped into a Google Drive folder triggers n8n, which sends it to Docling. Docling returns Markdown that is saved for agent ingest or RAG.new PDFPDFMarkdownGoogle Drivewatched foldern8ntrigger +orchestrationDoclingDockerMarkdownoutputAgentic ingestRAG index

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

Repo

View the repository on GitHub

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.