This enterprise-grade n8n workflow automates the Pharmaceutical Raw Material COA Verification & Vendor Quality Scoring System — from upload to final reporting — using AI-powered document extraction, specification matching, and dynamic vendor scoring. It processes Certificates of Analysis (COAs) to validate compliance, assign quality scores, generate approvals or CAPA requests, and notify stakeholders, ensuring regulatory adherence and vendor accountability with full audit trails and zero manual data entry.
| Step | Node | Description |
|---|---|---|
| 1 | START: Upload COA | Webhook trigger receives uploaded COA file for verification process |
| 2 | EXTRACT: Parse COA | Extracts test results and data from the COA document using AI parsing |
| 3 | ANALYZE: Vendor Compliance | Compares extracted data against specifications and flags deviations |
| 4 | SCORE: Vendor Quality Rating | Calculates weighted compliance score based on test results and history |
| 5 | DECISION: Compliance Route | Evaluates score/status: Branches to approve (green) or reject (red) path |
| 6 | APPROVED: Generate Approval Cert (Approved Path) | Creates digital approval certificate for compliant materials |
| 7 | Update Vendor Database | Saves verification record, score, and status to vendor database |
| 8 | NOTIFY: Email Alert | Sends detailed notifications to QA/production teams |
| 9 | REPORT: Final Report | Generates executive summary with COA scores and verifications |
| 10 | REJECT: Generate Rejection Report (Reject Path) | Produces rejection report with deviation details |
| 11 | Request CAPA | Initiates Corrective and Preventive Action (CAPA) process |
| 12 | PATH REJECTED | Terminates rejected branch with audit log entry |
| Integration | Details |
|---|---|
| File Storage (e.g., Google Drive/AWS S3) | API key or OAuth for COA upload handling |
| AI Extraction (e.g., Claude or OCR Tool) | API key for document parsing (e.g., claude-3-5-sonnet-20241022) |
| Database (e.g., PostgreSQL/Airtable) | Connection string for vendor records and specs |
| Email (SMTP/Gmail) | SMTP credentials or OAuth for notifications |
Ensure your database or Google Sheets include:
VendorDatabase for scores and historySpecifications for quality standards/coa-verification (for real-time file uploads)Use manual execution to confirm:
| vendorId | coaId | score | complianceStatus | lastVerified | deviations | capaRequested |
|--------------|-------------|----------|--------------------|--------------------|--------|--------------------|---------------|
| VEND-123456 | COA-789012 | 92.5 | Approved | 2025-11-04T14:30:00Z | None | No |
| materialType | testParam | specMin | specMax | weight |
|--------------|-------------|----------|--------------------|--------------------|--------|--------------------|---------------|----------|
| API Excipient | Purity (%) | 98.0 | 102.0 | 0.4 |
| Requirement | Version/Access |
|---|---|
| n8n | v1.50+ (AI and database integrations supported) |
| AI Parsing API | claude-3-5-sonnet-20241022 or equivalent OCR |
| Database API | SQL connection or Google Sheets API |
| Email API | https://www.googleapis.com/auth/gmail or SMTP |
| File Storage | AWS S3 or Google Drive API access |
Result:
A fully automated quality assurance pipeline that verifies COAs, scores vendors, and drives compliance decisions — ensuring pharmaceutical safety and efficiency with AI precision and complete traceability.
Explore More AI Workflows: Get in touch with us for custom n8n automation!