Templates / Automated document compliance validation with AI and vector database

Automated document compliance validation with AI and vector database

Needs changes

by Thapani Sawaengsri · 973 views · created 2025-08-20 · AI RAG, Multimodal AI

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: LangChain Code (legacy). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 17 nodes and runs when an HTTP POST request hits its webhook URL (plus 1 other trigger). Along the way it connects Embeddings Ollama, Qdrant Vector Store and Ollama Chat Model.

How it runs

Trigger: When an HTTP POST request hits its webhook URL (plus 1 other trigger).

  1. Fetch Document (Microsoft Graph) (HTTP Request): calls an HTTP API
  2. Format Procedure Payload (Code): runs custom JavaScript code
  3. Delete Old Document Vectors (LangChain Code): uses LangChain Code
  4. AI Compliance Validator (AI Agent): runs an AI agent, with model: Language Model (AI Agent); 1 tool (Retrieve Relevant Document Chunks); output parser: Parse AI Response
  5. Extract PDF Text (Extract from File): extracts data from a file (pdf)
  6. Return Compliance Report (Respond to Webhook): sends the response back to the webhook caller
  7. Insert Vectors into Qdrant (Qdrant Vector Store): stores documents in the Qdrant vector store, with embeddings: Generate Document Embeddings; document loader: Load Document Metadata

Services it uses

Embeddings OllamaQdrant Vector StoreOllama Chat Model

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • LangChain Code (legacy) in Delete Old Document Vectors: no direct replacement.

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Removed in 3.0Replace with
LangChain Code (legacy)
Delete Old Document Vectors
No direct replacement

Nodes used (13)

From the author

Description This workflow automates compliance validation between a policy/procedure and a corresponding uploaded document. It leverages an AI agent to determine whether the content of the document aligns with the expectations outlined in the provided…

Excerpt from Thapani Sawaengsri'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.