Block 1 - Audit Document Upload
- Type / Role
- n8n-nodes-base.webhook - webhook
- Config choices
- Version 2
This workflow is provided as-is. Please review and test before using in production.
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...
n8n-nodes-base.webhook, n8n-nodes-base.httprequest, @n8n/n8n-nodes-langchain.code, n8n-nodes-base.extractfromfile, @n8n/n8n-nodes-langchain.embeddingsollama, @n8n/n8n-nodes-langchain.vectorstoreqdrant, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Thapani Sawaengsri.
Original n8n.io sourceThis 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 procedure or policy.
A document (e.g., PDF) is uploaded via an HTTP Request Webhook.
The content is processed into vector embeddings using a Qdrant vector store and an embedding model.
A policy/procedure text and description are submitted via a second HTTP Request Webhook.
These serve as the basis for evaluating the uploaded document.
The AI agent receives:
The uploaded document (via vector embeddings)
The submitted procedure/policy text
The description/context
It returns a structured compliance analysis including:
Summary of Compliance (sections that align with policy)
Summary of Non-Compliance (gaps or missing elements)
Supporting Text Citations (document evidence)
Confidence Level (0–100 score based on evidence quality)
Pre-Conditions / Requirements
An n8n instance running with access to:
Qdrant (for vector storage)
An embedding model (e.g., OpenAI, HuggingFace, or local model)
Optional: Microsoft Graph or another storage system for document retrieval.
Accepts binary document files (PDF, DOCX, etc.).
Extracts text, generates embeddings, and stores them in Qdrant.
Returns a spDocumentId for reference.
Accepts a JSON payload with:
{ "procedure": "Policy or procedure text", "description": "Brief context or objective", "spDocumentId": "ID of the uploaded document" }
Links the procedure to the previously uploaded document.
Step 1: Upload the document.
Step 2: Submit the procedure referencing the same spDocumentId.
Step 3: AI agent evaluates compliance and returns results.
Example Input: Document Upload (Webhook 1)
Request: Binary file upload (example_policy.pdf)
Response:
{ "spDocumentId": "12345" }
{ "procedure": "All financial records must be retained for 7 years.", "description": "Retention policy compliance validation", "spDocumentId": "12345" }
{ "compliance_summary": "The document includes a 7-year retention requirement for invoices and payroll records.", "non_compliance_summary": "No reference to retention of vendor contracts.", "citations": [ { "text": "Invoices will be stored for 7 years.", "page": 4 } ], "confidence": 87 }
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Automated document compliance validation with AI and vector database |
|---|---|
| Complexity | advanced |
| Nodes | 22 |
| Categories | AI RAG, Multimodal AI |
| Author | Thapani Sawaengsri |
| Published | 20 Aug 2025 |
Use the JSON export at /data/workflows/7662/7662.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
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...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your AI RAG, Multimodal AI use case.