CORTEXFLOW · FREE FOREVER

Automation

AI RFQ-to-Quote Automator

↓ Download workflow JSON

Import in n8n: Workflows → ⋯ → Import from file, then add your credentials. Free download with a free account.

How it works

A complete RFQ-to-quotation pipeline for distributors, wholesalers, and trading companies that receive customer quotation requests as PDFs:

  1. STEP 1 — RFQ intake — a customer (or your sales team) opens the n8n form, uploads the RFQ PDF, and fills in the customer name. The Extract from File node pulls the PDF text, Prepare RFQ Record generates an RFQ-YYYYMMDD-XXXX reference, and Log RFQ — Status NEW appends a row to the RFQ Log sheet.
  2. STEP 2 — AI line-item extraction — the AI Agent — Extract Line Items (gpt-4o-mini with a Structured Output Parser) reads the PDF text and returns every line item as structured data: product code, description, quantity, unit. The RFQ Log flips to EXTRACTED.
  3. STEP 3 — Catalogue + price matching — the workflow reads your Catalogue and Price List sheets, then Match Lines Against Catalogue scores each line: an exact product-code match scores 1.0, a normalized description match scores 0.8. Prices are taken only from the approved price list — never from the AI. Unknown codes, missing prices, missing units, or low-confidence matches are flagged REVIEW and never auto-substituted. Matched lines land in the Quote Draft sheet; flagged lines land in the Review Queue sheet. The RFQ Log flips to MATCHED.
  4. STEP 4 — Review alert or quote email — if any lines need review, Telegram — Review Alert lists every flagged line with its issue (UNKNOWN_CODE, NO_APPROVED_PRICE, UNIT_MISSING, LOW_CONFIDENCE). If everything matched, Email — Send Quote Draft sends the reviewer an HTML quote table with line totals and the quote total. Both branches merge back together.
  5. STEP 5 — Final log + summary — the RFQ Log gets its final status (QUOTED → SENT, or REVIEW_NEEDED), and Telegram — Send Summary sends you the totals: lines, matched, review count, quote total.

Status flow in Sheets: NEW → EXTRACTED → MATCHED → QUOTED / REVIEW_NEEDED → SENT

Hard rules (from real buyer demand): prices come only from the approved price list, and product substitutions always require human approval — the workflow never invents or swaps a product on its own. When a customer asks for an Excel quotation, open the Quote Draft sheet and use File → Download → Microsoft Excel (.xlsx) — one click, no extra nodes needed.

Set up steps

You’ll need:

  • n8n (self-hosted or cloud)
  • An OpenAI API key — platform.openai.com → API keys
  • Google Sheets OAuth2 credentials — n8n Credentials → Google Sheets OAuth2
  • A Telegram bot — message @BotFather, send /newbot, copy the token; get your chat ID from @userinfobot
  • SMTP credentials — any provider (Gmail app password, SendGrid, your host); n8n Credentials → SMTP

Steps:

  1. Import the workflow — in n8n, Workflows → Import from File → select rfq-to-quote-automator.json.
  2. Create the spreadsheet — make one Google Sheet with these 5 tabs and exact headers:
    • Catalogue: product_code | description | category
    • PriceList: product_code | unit_price | currency | price_version
    • RFQ Log: rfq_reference | customer_name | received_at | stage | line_count | matched_count | review_count | quote_total | currency | status | notes
    • Quote Draft: rfq_reference | line_no | code | matched_code | description | quantity | unit | unit_price | line_total | currency | confidence | status
    • Review Queue: rfq_reference | line_no | code | description | quantity | unit | issue | confidence
  3. CONFIG — RFQ Settings — open the Set node and fill in:
    • spreadsheet_id — paste your spreadsheet ID
    • company_name, currency (e.g. USD, INR), confidence_threshold (0.8 is a good start), reviewer_email — who receives the quote draft email
    • Tab names only if you renamed them from the defaults above
    • Then select your Google Sheets credential in all six Google Sheets nodes (Log RFQ — Status NEW, Update RFQ Log — Status EXTRACTED, Read Catalogue, Read Price List, Append Review Queue, Append Quote Draft, Update RFQ Log — Status MATCHED, Update RFQ Log — Final Status)
  4. AI extraction — select your OpenAI credential in OpenAI Chat Model — Extraction (model is gpt-4o-mini by default).
  5. Quote email — select your SMTP credential in Email — Send Quote Draft. The recipient and sender both come from reviewer_email in the config.
  6. CONFIG — Notifications — paste your Telegram chat ID, select your Telegram credential in Telegram — Review Alert and Telegram — Send Summary, then activate the workflow and open the form URL from RFQ Intake — Form Trigger to test with a real RFQ PDF.

Customize it

  • Stricter matching — raise confidence_threshold to 1.0 and only exact product-code matches will auto-quote; everything else goes to human review.
  • Price versions — the matcher uses the first price row per product code. Keep an active price version at the top of your PriceList tab, or sort by price_version descending so the newest price wins.
  • Units enforcement — add a unit column to your Catalogue and extend the match code to flag unit mismatches (e.g. RFQ says “boxes”, catalogue sells “pcs”).
  • Approval before sending — insert an n8n Wait node (approval) between Build Quote Email and Email — Send Quote Draft so a human signs off before the quote goes out.
  • Multi-currency RFQs — add a currency column to the PriceList and match on (product_code, currency) instead of code alone.
  • Push to your ERP/CRM — after Merge — Combine Notify Branches, add an HTTP Request node posting the quote draft rows to your ERP’s sales-quotation endpoint.
  • Customer portal — the Form Trigger URL is shareable: send it to repeat customers so RFQs arrive structured instead of as email attachments.

Workflow nodes

This workflow is built from 29 nodes. Here's what each one does:

#NodeTypeWhat it does
1 RFQ Intake — Form Trigger n8n Form Trigger Starts the workflow from an n8n form submission.
2 CONFIG — RFQ Settings Set Holds editable configuration values — fill in your own settings here before activating.
3 CONFIG — Notifications Set Holds editable configuration values — fill in your own settings here before activating.
4 Extract RFQ Text — PDF Extract from File Extracts text content from uploaded files (PDF, docs).
5 Prepare RFQ Record Code Runs custom JavaScript to transform, filter, or compute data between steps.
6 Log RFQ — Status NEW Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
7 AI Agent — Extract Line Items AI Agent The AI brain — reasons over the task and calls tools to get it done.
8 OpenAI Chat Model — Extraction OpenAI Chat Model The language model powering the AI agent.
9 Structured Output Parser — Line Items Structured Output Parser Forces the AI to return clean, structured JSON instead of free text.
10 Update RFQ Log — Status EXTRACTED Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
11 Normalize Line Items Code Runs custom JavaScript to transform, filter, or compute data between steps.
12 Read Catalogue Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
13 Read Price List Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
14 Match Lines Against Catalogue Code Runs custom JavaScript to transform, filter, or compute data between steps.
15 IF — Line Needs Review? IF Splits the flow into branches based on a condition.
16 Append Review Queue Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
17 Append Quote Draft Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
18 Merge — Combine Branches Merge Combines the outputs of two or more branches back into one flow.
19 Build RFQ Stats Code Runs custom JavaScript to transform, filter, or compute data between steps.
20 Update RFQ Log — Status MATCHED Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
21 IF — Review Needed? IF Splits the flow into branches based on a condition.
22 Build Review Alert Code Runs custom JavaScript to transform, filter, or compute data between steps.
23 Telegram — Review Alert Telegram Sends you a Telegram message or alert.
24 Build Quote Email Code Runs custom JavaScript to transform, filter, or compute data between steps.
25 Email — Send Quote Draft Send Email (SMTP) Sends email through your SMTP server.
26 Merge — Combine Notify Branches Merge Combines the outputs of two or more branches back into one flow.
27 Update RFQ Log — Final Status Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
28 Build Summary Message Code Runs custom JavaScript to transform, filter, or compute data between steps.
29 Telegram — Send Summary Telegram Sends you a Telegram message or alert.

Setup instructions

1. Add your credentials

In n8n go to Credentials → New, create each credential below, then open the named node and select it:

NodeCredential to add
Log RFQ — Status NEW Google Sheets OAuth2
OpenAI Chat Model — Extraction OpenAI API
Update RFQ Log — Status EXTRACTED Google Sheets OAuth2
Read Catalogue Google Sheets OAuth2
Read Price List Google Sheets OAuth2
Append Review Queue Google Sheets OAuth2
Append Quote Draft Google Sheets OAuth2
Update RFQ Log — Status MATCHED Google Sheets OAuth2
Telegram — Review Alert Telegram Bot API
Email — Send Quote Draft SMTP
Update RFQ Log — Final Status Google Sheets OAuth2
Telegram — Send Summary Telegram Bot API

2. Fill in your config values

Open the config node listed below and replace each placeholder with your own value before activating the workflow:

NodeFieldWhat to paste
CONFIG — RFQ Settings spreadsheet_id PASTE_YOUR_SPREADSHEET_ID
Your spreadsheet id
CONFIG — RFQ Settings company_name PASTE_YOUR_COMPANY_NAME
Your company name
CONFIG — RFQ Settings reviewer_email PASTE_YOUR_REVIEWER_EMAIL
Your reviewer email
CONFIG — Notifications telegram_chat_id PASTE_YOUR_TELEGRAM_CHAT_ID
Your telegram chat id

How this workflow starts

  • Form Trigger: Form "Submit RFQ — Quote Request" — share the generated form URL to collect submissions.

Use cases

Distributors and wholesalers lose hours to RFQs that arrive as messy PDFs: someone has to read every line item, look up each product code, check the approved price, and type out a quote — while the customer is also asking three competitors. This template compresses that into minutes. A customer or salesperson uploads the RFQ PDF through an n8n form, the text is extracted, an AI agent pulls out every line item as structured data, and each line is matched against your Catalogue and Price List sheets. Prices come only from the approved price list — never from the AI — and anything uncertain lands in a Review Queue for a human instead of being guessed.

The electronics distributor quoting 50-line RFQs

A distributor gets RFQs with fifty line items from contractors who need quotes by end of day. The form trigger generates an RFQ-YYYYMMDD-XXXX reference, the AI extraction returns product code, description, quantity, and unit per line, and Match Lines Against Catalogue scores each one — an exact product-code match scores 1.0, a normalized description match scores 0.8. Matched lines land in the Quote Draft sheet, and the reviewer gets an HTML quote table by email with line totals and the quote total. Practical tip: when the customer asks for Excel, open the Quote Draft sheet and use File, Download, Microsoft Excel — one click, no extra nodes needed.

The industrial supplies wholesaler with 5,000 SKUs

At five thousand SKUs, manual line-item matching is a full-time job. The wholesaler keeps its Catalogue and Price List as the two source-of-truth tabs, and the matcher flags anything it cannot resolve: UNKNOWN_CODE, NO_APPROVED_PRICE, UNIT_MISSING, or LOW_CONFIDENCE. Flagged lines go to the Review Queue sheet and trigger a Telegram review alert listing every issue, while clean lines still produce the draft. Practical tip: raise confidence_threshold to 1.0 and only exact product-code matches will auto-quote — everything else goes to human review, which is the right call for high-value industrial orders.

The IT hardware reseller juggling currencies

A reseller quoting in USD, EUR, and INR keeps one Price List tab with a currency column and matches on product code plus currency, so a line never picks up the wrong region's price. The price_version column lets the team keep an active price version at the top, or sort newest-first so the latest price always wins. The RFQ Log tracks every request from NEW through EXTRACTED and MATCHED to QUOTED or REVIEW_NEEDED and finally SENT. Practical tip: add an approval Wait node between building the quote email and sending it, so a human signs off before any quote leaves the building.

The building materials supplier with a field sales team

Sales reps collect RFQ PDFs on site visits and used to email them to the back office. Now they open the shareable form URL on their phones, upload the PDF, and type the customer name — the RFQ enters the pipeline structured instead of as an email attachment. The Telegram summary at the end reports lines, matched count, review count, and quote total, so the sales manager sees the state of every quote without opening a spreadsheet. Practical tip: send the form URL to repeat customers directly and RFQs start arriving structured from the source, skipping the sales team entirely.

The trading company pushing quotes into its ERP

A trading company that already runs an ERP does not want another silo. After the notify branches merge, an HTTP Request node can post the Quote Draft rows straight to the ERP's sales-quotation endpoint, and the final RFQ Log status becomes the handoff record. The workflow never invents or substitutes a product on its own — substitutions always require human approval — which is exactly the guarantee an ERP-driven operation needs. Practical tip: start with the Telegram review alerts for a week to learn which lines keep getting flagged, then fix the Catalogue descriptions for those items — the match rate climbs fast once the catalogue matches how customers actually write.

← All templates