This manual provides technical documentation for the n8n v2 infrastructure and workflows hosted within the MDL Ops Engine.
The system is built on a modular Docker-based architecture for high reliability and AI-driven processing.
n8n-v2: The core automation engine (n8nio/n8n).n8n-db-v2: PostgreSQL 16 database for workflow persistence.excel-api: A custom Flask API using Aspose/Pandas for high-fidelity Excel-to-Image and Excel-to-JSON conversion.python-runner-v2: Dedicated task runner for executing complex Python scripts within workflows.cloudflared: Secure tunnel connector that exposes n8n to the public internet without opening firewall ports.https://automate.mdlcommunications.comn8n-mdl-v2) with a dedicated config.yml for precise routing.https://automate.mdlcommunications.com/webhook/./app (project root) and ./local-files (n8n specific).The system uses a unified master workflow that handles all quote intake and analysis.
mdlcommunications.com for emails with attachments.ML2026xxxx) from filenames or document content if not explicitly provided.DocNumber to prevent redundant Bill creation.MDL-Ops-Work-In-Progress.subtotal, shipping, currency, supplier_reference, vendor_name.WORK_ITEMS tab) to track status (Intake -> Analyzed -> Audited).The AI accuracy is maintained through a rigorous benchmarking process.
To add or improve vendor extraction:
1. Samples: Place new PDFs in n8n-docker/samples/{VENDOR}/.
2. Ground Truth: Run python n8n-docker/scripts/setup_ground_truth.py to create labeling templates.
3. Benchmarking: Run python n8n-docker/scripts/benchmark_ai.py to measure accuracy.
4. Prompt Tuning: Update the Gemini node in N8N with new "EXAMPLES" derived from the raw text of samples.
The excel-api service provides tools for:
- Converting Sales Quotes to images for visual verification in Slack/Email.
- Extracting specific cells for audit comparison.
Access to the n8n automation engine is strictly controlled via a dual-layer security model.
Before reaching the application, users must authenticate via Microsoft Azure AD.
- Scope: Access is restricted to @mdlcommunications.com email addresses.
- Policy: Managed in the Cloudflare Zero Trust dashboard under "Access Applications".
- Bot Protection: All search engine indexing is blocked via a global X-Robots-Tag: noindex policy and Cloudflare-level bot management.
Once past the Cloudflare wall, users must log in with their individual n8n service accounts.
| Issue | Potential Cause | Resolution |
|---|---|---|
| Workflow Paused | Docker memory limit | Check docker stats n8n-v2, increase in docker-compose.yaml. |
| Auth Error | Token expired | Re-authenticate Google/Outlook credentials in the N8N UI. |
| $0.00 Extraction | Layout change | Update "Few-Shot" examples in the Gemini node system prompt. |
| Excel Fail | Invalid format | Verify file is not corrupt; restart excel-api container. |