Doc Variables + Zapier: Automate Document Generation from Any App
You've built beautiful document templates in Doc Variables. They save time every time you use them. But what if those documents could create themselves—triggered automatically when a deal closes in your CRM, a form gets submitted, or a row appears in a spreadsheet?
That's exactly what the Doc Variables + Zapier integration enables. Connect your templates to 5,000+ apps and watch documents generate automatically, 24/7, without manual intervention.
What Doc Variables + Zapier Enables
Zapier acts as a bridge between Doc Variables and virtually any other application you use. When something happens in one app (a "trigger"), Zapier automatically performs an action in another app—like generating a document from your template.
Real examples of what you can automate:
- CRM → Contract: When a deal moves to "Closed Won" in Salesforce or HubSpot, automatically generate a signed-ready contract with all client details pre-filled
- Form → Invoice: When a client submits a project request form in Typeform or Google Forms, generate an invoice with their details and project scope
- Spreadsheet → Certificates: When you add a row to your training completion sheet, generate a personalized certificate
- E-commerce → Receipt: When a Shopify order comes through, create a detailed receipt document
- Calendar → Agenda: Before a meeting starts, generate an agenda document with attendee names and meeting details
The pattern is always the same: data enters one app, a document exits Doc Variables—automatically.
Step-by-Step Setup
Prerequisites
Before you start, you'll need:
- A Doc Variables subscription (the Zapier integration requires a paid plan)
- A Zapier account (free tier works for testing)
- A Doc Variables template ready to go (with variables like
${Client Name},${Amount}, etc.)
Step 1: Create Your Template in Google Docs
If you haven't already, create a document template with Doc Variables syntax. For a contract example:
SERVICE AGREEMENT
This Agreement is entered into on ${Effective Date::date} between:
${Provider Company} ("Provider")
and
${Client Company} ("Client")
Client Contact: ${Client Name}
Client Email: ${Client Email}
SCOPE OF SERVICES
${Project Description::textarea}
COMPENSATION
Total Project Fee: $${Project Amount}
Payment Terms: ${Payment Terms::dropdown::Net 15,Net 30,Net 45,Due on Receipt}
TERMS
This agreement shall remain in effect for ${Contract Duration::dropdown::30 days,90 days,6 months,1 year} from the Effective Date.Note the variable names—you'll map data to these exact names in Zapier.
Step 2: Connect Doc Variables to Zapier
- Log into Zapier
- Click Create Zap
- Search for "Doc Variables" in the action apps
- Select Doc Variables and choose an action:
- Replace Variables: Generate a single document with variable values you provide
- Merge from Sheet: Generate multiple documents from spreadsheet data
- Connect your Google account when prompted (this authorizes Doc Variables to access your Google Docs)
Step 3: Set Up Your Trigger
The trigger is "what starts the automation." Choose based on your workflow:
For CRM-triggered contracts:
- App: Salesforce, HubSpot, Pipedrive, or your CRM
- Trigger: "Deal Stage Changed" or "Opportunity Closed Won"
For form-triggered documents:
- App: Typeform, Google Forms, JotForm, Gravity Forms
- Trigger: "New Form Submission" or "New Response"
For spreadsheet-triggered documents:
- App: Google Sheets, Airtable, Excel
- Trigger: "New Row" or "Updated Row"
For e-commerce documents:
- App: Shopify, WooCommerce, Stripe
- Trigger: "New Order" or "Payment Received"
Step 4: Configure the Doc Variables Action
Now map your trigger data to your template variables:
- Select your template document (paste the Google Docs URL or document ID)
- For each variable in your template, map the corresponding field from your trigger:
Client Name→ CRM Contact Name fieldClient Email→ CRM Contact Email fieldProject Amount→ CRM Deal Value fieldEffective Date→ Current date or CRM Close Date
- Choose your output folder in Google Drive
- Optionally, check "Save as PDF" for a final document format
Step 5: Test Your Zap
Zapier will pull in sample data from your trigger app. Review the test document to make sure:
- All variables replaced correctly
- Formatting looks right
- Document saved to the correct folder
If everything looks good, turn on your Zap. From now on, documents generate automatically.
Example Workflows
Workflow 1: HubSpot Deal → Client Contract
Trigger: HubSpot – Deal Stage Changed to "Closed Won"
Action: Doc Variables – Replace Variables
Variable Mapping:
- Client Company → Deal Company Name
- Client Name → Deal Contact Name
- Client Email → Deal Contact Email
- Project Amount → Deal Amount
- Effective Date → Deal Close Date
- Project Description → Deal Description (custom property)
Result: Every closed deal automatically gets a contract generated and saved to a "Contracts" folder, ready for signature.
Workflow 2: Typeform Submission → Project Invoice
Trigger: Typeform – New Entry
Action: Doc Variables – Replace Variables
Variable Mapping:
- Client Name → Form field: "Your Name"
- Client Email → Form field: "Email Address"
- Project Type → Form field: "What service do you need?"
- Project Description → Form field: "Describe your project"
- Hours Estimate → Form field: "Estimated hours"
Calculated field in template: ${Total=Hours Estimate*150} (auto-calculates at $150/hour)
Result: Client submits request form, invoice generates instantly with their details and calculated total.
Workflow 3: Google Sheets → Batch Certificates
Trigger: Google Sheets – New Row in "Training Completions"
Action: Doc Variables – Replace Variables
Variable Mapping:
- Recipient Name → Column A
- Course Name → Column B
- Completion Date → Column C
- Certificate Number → Column D (auto-generated in sheet)
Result: Add a name to your spreadsheet, get a personalized certificate in your Drive within seconds.
Workflow 4: Stripe Payment → Receipt Document
Trigger: Stripe – New Charge
Action: Doc Variables – Replace Variables
Variable Mapping:
- Customer Name → Stripe Customer Name
- Customer Email → Stripe Customer Email
- Amount Paid → Stripe Charge Amount
- Payment Date → Stripe Charge Created date
- Invoice Number → Stripe Charge ID
Result: Every payment automatically generates a branded receipt document.
Tips for Power Users
1. Use Zapier Filters for Conditional Document Generation
Not every trigger should create a document. Add a Zapier filter step to only proceed when certain conditions are met:
- Only generate contracts for deals over $5,000
- Only create invoices for specific project types
- Only produce certificates for passing scores above 80%
2. Chain Multiple Actions After Document Creation
After Doc Variables generates your document, add more Zapier actions:
- Send an email with the document attached (Gmail, Outlook)
- Upload to a client portal (Dropbox, SharePoint)
- Create a task to review the document (Asana, Trello)
- Send for e-signature (DocuSign, HelloSign)
- Notify your team in Slack
3. Use Formatter Steps for Data Cleanup
Raw data from triggers often needs formatting. Use Zapier's Formatter tool to:
- Format dates consistently ("February 4, 2026" vs "2/4/26")
- Capitalize names properly
- Format currency with commas and decimals
- Extract first/last names from full name fields
4. Create Multi-Document Workflows
Some processes need multiple documents. Use Zapier Paths to generate different documents based on conditions:
- New client? Generate NDA + Contract + Welcome packet
- Project type is consulting? Generate SOW template A
- Project type is development? Generate SOW template B
5. Log Everything to a Spreadsheet
Add a final action that logs each generated document to a Google Sheet. Track:
- Document name
- Client/recipient
- Generation date
- Google Drive link
This creates an audit trail and makes documents easy to find later.
Troubleshooting Common Issues
Variables not replacing? Check that variable names in Zapier exactly match your template—including capitalization and spaces. Client Name won't match client name.
Wrong date format? Use Zapier's Formatter to convert dates before sending to Doc Variables.
Document not appearing in folder? Verify you have write access to the destination folder and the folder ID is correct.
Zap running but no document? Check your Zapier task history for errors. Common issues include expired Google authorization or hitting Doc Variables usage limits.
Get Started
Automation turns Doc Variables from a time-saver into a time-eliminator. Documents that used to require manual effort now happen in the background while you focus on work that actually needs your brain.
Start simple:
- Pick one document you create repeatedly
- Identify where the data for that document lives (CRM, form, spreadsheet)
- Build a Zap connecting the two
- Watch documents appear automatically
Install Doc Variables if you haven't already, then head to Zapier to connect your first workflow. Your future self will thank you for every document you never have to create manually again.
Doc Variables is the top-rated template automation add-on for Google Workspace, trusted by 160,000+ professionals who automate their document workflows.
Ready to try Doc Variables?
Join 190,000+ users creating amazing Google Doc templates.
Install Now - It's Free