Autonomous Bid & Quoting Engine
Engineered an end-to-end autonomous RFQ intake, AI-driven extraction, CRM pipeline synchronization, and dynamic A3 proposal generation engine for an enterprise market research agency—slashing quote delivery from 6 hours to under 3 minutes.
Down from 4-6 hours of manual spreadsheet work
Zero forwarded-sender misattributions in CRM
Idempotent deduplication across message & thread IDs
Reallocated from admin triage to high-value closing
The Operational Bottlenecks
The client received high volumes of complex Requests for Quotation (RFQs) in unstructured email formats. Each inbound inquiry contained disparate specifications—varying sample sizes, quotas, target demographics (B2B, Healthcare, Consumer), multi-phase methodologies, and attachments (.xlsx, .pdf). The existing manual intake was fraught with operational bottlenecks:
Sales executives frequently forwarded inbound client RFQs to a centralized inbox. Legacy automated workflows mistakenly extracted the internal employee's email as the prospective client, polluting the CRM with circular communication loops.
Thread replies, automated read receipts, and subsequent follow-ups repeatedly spawned duplicate deals in the CRM pipeline, inflating pipeline metrics and causing reps to prepare competing duplicate proposals.
Quoting required evaluating multiple methodology options (online, in-person, hybrid), session lengths (LOI), and add-on pricing. Calculating these in ad-hoc spreadsheets caused math inconsistencies and unversioned pricing drift.
When clients requested scope adjustments, reps overwrote existing documents. There was no immutable audit trail of past quotes, and manual PDF exports suffered from inconsistent styling and broken page breaks.
5-Layer Autonomous Architecture
We architected a resilient, 5-layer autonomous pipeline connecting Microsoft 365, n8n orchestration, OpenAI structured extraction, GoHighLevel CRM, and a custom Supabase-backed quoting application.
Intelligent Inbound Ingestion & Identity Resolution
Microsoft 365 + n8n CloudPolls shared mailboxes every 60s, ingests attachments, and runs a multi-stage identity resolution algorithm to reliably isolate external client emails from internal forwarders.
Deterministic AI Extraction Contract
OpenAI GPT-4 JSON EngineEnforces a strict zero-shot JSON schema parsing raw inquiries into structured parameters: sample size (N), methodology options, locations, incidence rates (IR%), LOI, and phishing/spam confidence scoring.
CRM Pipeline Orchestration & Two-Way Sync
GoHighLevel (GHL) CRMCreates or updates CRM contacts, provisions deals in the 'Bid Pipeline' at 'New Bid', and initiates native Outlook Two-Way synchronization for complete conversation history without duplicate webhook loops.
Headless Interactive Quoting App & Immutable Versioning
Custom App + Supabase PostgreSQLReps open the Quote App with instant pre-filled AI bid parameters. As quotes are adjusted, atomic RPC functions store immutable revision snapshots (`Original Bid`, `Revision 1`, `Revision 2`) while skipping redundant 'no-change' saves.
Vector A3 PDF Proposal Generator & Threaded Dispatch
jsPDF Engine + Microsoft GraphClones and normalizes the DOM to generate pixel-perfect A3 vector PDF proposals, uploads them to secure storage buckets, and triggers automated Outlook email dispatch preserving the original RFQ subject for 100% thread continuity.
Key Algorithmic Breakthroughs
1. The Forwarder-Safe Client Identity Algorithm
To solve the critical flaw where forwarded emails attributed the internal sales rep as the client, we built a deterministic candidate evaluation pipeline in n8n JavaScript code:
// 1. Inspect headers and body for forwarding markers
const isForwarded = /from:|subject:.*fwd:/i.test(emailBody);
// 2. Extract potential email candidates from text & HTML
const candidates = extractAllEmailAddresses(emailBody);
// 3. Filter out all internal company domains and system addresses
const validExternalClients = candidates.filter(email => {
const domain = email.split('@')[1]?.toLowerCase();
return domain && !INTERNAL_DOMAINS.includes(domain) && email !== SYSTEM_MAILBOX;
});
// 4. Validate confidence or fallback to manual triage gate
if (validExternalClients.length > 0) {
finalClientEmail = validExternalClients[0];
needsManualReview = false;
} else {
needsManualReview = true; // Safe human-in-the-loop fallback
}2. Idempotent Deduplication & Thread State Architecture
Inbound emails are evaluated against an active deduplication store using both `messageId` (unique email identifier) and `conversationId` (Outlook thread identifier):
3. Immutable Version Control & The 'No-Change' Guard
In the quoting layer, quotes are persisted into Supabase (`fi_quotes` header table and `fi_quote_versions` detail table). We implemented deep payload equality checks before executing RPC version increments to prevent volatile metadata (such as timestamps) from creating false revisions.
Integrated Technology Stack
Business & Operational ROI
The automated bid and quote architecture transformed the agency's sales operations from a slow, manual spreadsheet workflow into a streamlined, automated quotation machine.
Proposals that previously took 4 to 6 hours of manual analysis and drafting are now generated and delivered in under 3 minutes.
100% of forwarded client RFQs correctly identify the true external stakeholder, eliminating communication mix-ups.
Every price adjustment and scope change is permanently recorded in PostgreSQL immutable version tables.
The sales engineering team reclaimed significant weekly hours, shifting focus entirely from data entry to client relationships.
Ready to Automate Your High-Volume Workflows?
Whether you need multi-system CRM orchestration, intelligent AI extraction contracts, or custom proposal engines, let's build an unshakeable automated system for your agency.