Note: A basic understanding of spreadsheet structures and JavaScript (or Python) will help with customizing templates and logic.
Automatically Generate Professional Sales Quotes with QR Code Tracking
What You'll Have When Done: Turn any quote request into a professional, trackable PDF sales quote automatically - works with CRMs, spreadsheets, or any data source.
Prerequisites
Before you begin, make sure you have:
- A PDF.co API Key (Get yours here)
- A Google Sheets account with OAuth2 credentials in n8n
- A Google Drive account with OAuth2 credentials in n8n
- A Google Drive destination folder (Create folders here)
- An n8n instance (cloud or self-hosted)
- A PDF.co HTML Template ID (View sample | Create your own)
- A sample quote spreadsheet with multiple items (Download sample spreadsheet)
Quick Start Options
Option A: I Want It Working Now
- Import this workflow template → Download JSON File
- Connect your Google Sheets, Google Drive, and PDF.co accounts
- Set up your quote spreadsheet with required columns
- Test with sample quote data
- Activate and run
Option B: I Want to Build It Step-by-Step
Follow the 5-step guide below to create the automation from scratch.
What This Automation Does (Overview)
- Detects new sales quote requests from your spreadsheet
- Processes and groups line items by Quote ID
- Converts the data into a structured format for PDF generation
- Generates a professional sales quote PDF with embedded QR code
- Saves completed quote to your designated Google Drive folder
Step 1: Monitor for New Quote Requests
Node: Google Sheets Trigger → Poll Changes
Settings:
- Trigger On:
New or Updated Rows
- Document From List: Your Google Sheet name
- Sheet:
Sheet1
(or your custom sheet name)
Success Looks Like: The trigger activates when new quote data is added. If multiple rows share the same Quote ID, they will be grouped as part of a single quote.
Step 2: Process and Structure Quote Data
Node: Code (JavaScript)
Settings:
- Use the provided JavaScript code (View Sample) that handles:
- Converting Excel dates to readable formats
- Grouping multiple rows by Quote ID
- Applying tax and discount calculations
Success Looks Like: Raw spreadsheet rows are transformed into a structured quote object, including client information and grouped line items.
Note: The script automatically handles multi-item quotes by grouping rows with matching Quote IDs.
Step 3: Generate Professional PDF Quote
Node: PDF.co → URL/HTML to PDF
Settings:
- Convert Type:
HTML Template to PDF
- HTML Template ID: 1 (Update with your template ID)
- Template Data: Map quote fields using n8n expressions
Template Data Mapping:
{
"quote_id": "{{ $json.quote_id }}",
"quote_date": "{{ $json.quote_date }}",
"quote_validUntil": "{{ $json.quote_validUntil }}",
"sales_rep": "{{ $json.sales_rep }}",
"client_name": "{{ $json.client_name }}",
"client_company": "{{ $json.client_company }}",
"client_address": "{{ $json.client_address }}",
"client_email": "{{ $json.client_email }}",
"client_phone": "{{ $json.client_phone }}",
"items": {{ JSON.stringify($json.items) }},
"discount": {{ $json.discount }},
"tax": {{ $json.tax }}
}
Advanced Options:
- File Name:
{{ $json.client_name }}_Sales_Quote.pdf
Success Looks Like: PDF.co returns a temporary URL for the generated quote, formatted using your HTML template and including a QR code for tracking.
Note: Our system templates include branding, itemized tables, totals, and a QR code. You can customize the layout in the PDF.co HTML Template Editor.
Step 4: Download Generated Quote
Node: HTTP Request
Settings:
- Method:
GET
- URL:
{{ $json.url }}
Success Looks Like: The PDF quote is downloaded as binary data, ready for storage.
Step 5: Save to Designated Folder
Node: Google Drive → Upload File
Settings:
- Input Data Field Name:
data
- Parent Drive From List:
My Drive
- Parent Folder From List:
Your target folder for sales quotes
Success Looks Like: The completed sales quote appears in your Google Drive folder, ready for sharing with the client.
Tip: You can control access by setting folder permissions or configure automatic delivery via email by adding an Email node.
Congrats! You’ve automated the entire quote generation process—from incoming data to branded PDF with QR code tracking, stored and ready for delivery.
Built something cool? Share it with us @pdfdotco
Related Tutorials



