Doc Variables
← Back to Resources

Connect HubSpot to Google Docs Templates: Auto-Generate Contracts, Proposals & More

Connect HubSpot to Google Docs Templates: Auto-Generate Contracts, Proposals & More

Your sales team tracks everything in HubSpot. Contact details, deal values, close dates, lifecycle stages—every interaction is logged. But when it's time to send a contract or proposal, someone opens Google Docs and starts the tedious copy-paste ritual.

What if moving a deal to "Closed Won" in HubSpot automatically generated a complete, ready-to-sign contract with all the deal details already filled in?

That's exactly what the HubSpot + Doc Variables integration enables. Connect your CRM data directly to your Google Docs templates and eliminate manual document creation from your sales process.

Why Connect HubSpot to Google Docs?

HubSpot users already have all the data needed for contracts, proposals, and other sales documents:

  • Company name and billing address
  • Contact name, title, and email
  • Deal amount and close date
  • Products or services (line items)
  • Deal owner and team
  • Custom properties for your specific needs

Manually copying this data into documents is slow and error-prone. A typo in a client name or wrong dollar amount can delay deals, damage relationships, or create legal headaches.

Automating this connection eliminates manual data entry. The contract that used to take 20 minutes now takes zero—it generates itself when the deal closes.

What Documents Can You Automate?

Any document that pulls from HubSpot data is a candidate for automation:

Sales Documents:

  • Contracts and service agreements
  • Proposals and quotes
  • Statements of work (SOWs)
  • Order forms
  • Non-disclosure agreements (NDAs)

Customer Communications:

  • Welcome packets for new clients
  • Onboarding documents
  • Renewal offers
  • Account review summaries

Internal Documents:

  • Deal summaries for leadership
  • Handoff documents between teams
  • Commission reports

How the Integration Works

The HubSpot + Doc Variables integration uses Zapier to bridge your CRM and Google Docs. Here's the flow:

  1. Trigger: Something happens in HubSpot (deal stage changes, contact created, form submitted)
  2. Data Pull: Zapier retrieves the relevant HubSpot record properties
  3. Document Generation: Doc Variables creates a new document from your template, replacing all variables with HubSpot data
  4. Output: The finished document saves to Google Drive, ready for review or signature

The entire process happens automatically, in seconds, with no manual intervention.

Step-by-Step Setup Guide

Prerequisites

Before you begin, you'll need:

  • HubSpot account (Free CRM, Starter, Professional, or Enterprise)
  • Doc Variables subscription (install from Google Workspace Marketplace)
  • Zapier account (free tier works for testing; paid for production)
  • A Google Docs template with Doc Variables placeholders

Step 1: Create Your Template in Google Docs

Build a document template with variables that match the data you'll pull from HubSpot. Use the ${Variable Name} syntax:

SERVICE AGREEMENT

This Agreement is entered into on ${Close Date::date::long} between:

${Your Company Name} ("Provider")
and
${Company Name} ("Client")

Client Contact: ${Contact First Name} ${Contact Last Name}
Client Email: ${Contact Email}
Client Address: ${Company Street Address}, ${Company City}, ${Company State} ${Company Zip}

SCOPE OF SERVICES
${Deal Name}

COMPENSATION
Total Contract Value: $${Deal Amount}
Payment Terms: ${Payment Terms::dropdown::Net 15,Net 30,Net 45,Due on Receipt}

TERM
This agreement begins on ${Close Date::date} and continues for ${Contract Duration::dropdown::30 days,90 days,6 months,1 year}.

ACCEPTED AND AGREED:

_____________________________
${Contact First Name} ${Contact Last Name}
${Company Name}

_____________________________
${Deal Owner Name}
${Your Company Name}

Pro tip: Name your variables to match HubSpot property names where possible—it makes mapping easier in Zapier.

Step 2: Connect HubSpot to Zapier

  1. Log into Zapier and click Create Zap
  2. Search for "HubSpot" as your trigger app
  3. Choose a trigger event:
    • New Deal in Stage — Generate documents when deals reach a specific stage
    • New Deal — Generate documents for every new deal
    • New Contact — Generate welcome documents for new contacts
    • Updated Deal — Generate when deal properties change
  4. Connect your HubSpot account (you'll authorize Zapier access)
  5. Select the pipeline and stage to monitor (e.g., "Sales Pipeline" → "Closed Won")

Step 3: Add Lookup Steps for Related Data

HubSpot deals often need data from associated contacts and companies. Add Zapier steps to retrieve this data:

  1. Add a "Find Contact" action in HubSpot to get the primary contact's details
  2. Add a "Find Company" action to get company information
  3. Chain these before the Doc Variables action

This ensures your contract includes contact name, email, company address, and other related information.

Step 4: Add Filters (Optional but Recommended)

Not every deal should generate a document. Add a Zapier Filter step to control when documents are created:

  • Only closed-won deals: Deal Stage equals "Closed Won"
  • Only deals above a threshold: Deal Amount greater than $5,000
  • Only specific deal types: Deal Type contains "Enterprise"
  • Only your deals: Deal Owner equals your HubSpot user ID

Filters prevent unnecessary document generation and keep your Google Drive organized.

Step 5: Configure the Doc Variables Action

  1. Add a new action step in your Zap
  2. Search for "Doc Variables" and select it
  3. Choose the action: Replace Variables
  4. Connect your Google account
  5. Select your template document
  6. Map HubSpot properties to template variables:
Template VariableHubSpot Source
Company NameCompany → Company Name
Contact First NameContact → First Name
Contact Last NameContact → Last Name
Contact EmailContact → Email
Deal AmountDeal → Amount
Close DateDeal → Close Date
Deal Owner NameDeal → Deal Owner → Name
Deal NameDeal → Deal Name
  1. Set the output folder in Google Drive
  2. Configure file naming (e.g., "Contract - {Company Name} - {Close Date}")
  3. Optionally enable PDF export

Step 6: Add Follow-Up Actions (Optional)

After generating the document, chain additional Zapier actions:

  • Send for signature: Create a DocuSign or PandaDoc envelope with the generated document
  • Email the sales rep: Send a Gmail notification with a link to the new document
  • Update HubSpot: Add a note to the Deal with the document link
  • Create a task: Add a follow-up task in HubSpot to review the document
  • Notify in Slack: Post to your sales channel that a contract was generated

Step 7: Test and Activate

  1. Click Test Zap in Zapier
  2. Zapier will pull a sample Deal from HubSpot
  3. Review the generated document—check that all variables replaced correctly
  4. If everything looks good, turn on your Zap

From now on, every qualifying deal automatically generates a contract.

Working with HubSpot Properties

Standard Properties

HubSpot includes many standard properties that work great for document generation:

Deal Properties:

  • Deal Name
  • Amount
  • Close Date
  • Deal Stage
  • Deal Owner
  • Pipeline
  • Deal Type

Contact Properties:

  • First Name / Last Name
  • Email
  • Phone Number
  • Job Title
  • Lifecycle Stage

Company Properties:

  • Company Name
  • Street Address / City / State / Zip
  • Industry
  • Number of Employees
  • Annual Revenue

Custom Properties

HubSpot lets you create custom properties for data specific to your business. Common examples for document automation:

  • Contract Duration
  • Payment Terms
  • Service Level (Standard/Premium/Enterprise)
  • Billing Frequency
  • Special Terms or Notes

Create these custom properties in HubSpot Settings → Properties, then map them in Zapier just like standard properties.

Conditional Content Based on HubSpot Data

Doc Variables supports conditional sections that show or hide content based on variable values. This lets you create one template that adapts to different scenarios:

?{${Deal Amount}(>)50000::As a strategic account, you are eligible for our Executive Business Review program and dedicated account manager.}

?{${Service Level}(=)Enterprise::This Enterprise Agreement includes 24/7 premium support, 99.9% uptime SLA, and quarterly business reviews.}

?{${Service Level}(=)Standard::This Standard Agreement includes business hours support (9 AM - 5 PM EST) and email ticketing.}

Different deal sizes, service levels, or customer types automatically get different contract language—all from the same template.

Calculated Fields

Perform calculations directly in your template:

${Deal Amount}
${Discount Percent}
${Final Amount=Deal Amount*(1-Discount Percent/100)}

Even if HubSpot doesn't have a calculated property for what you need, Doc Variables can compute it during document generation.

Common Use Cases

Use Case 1: Auto-Generate Contracts at Close

Trigger: Deal Stage changed to "Closed Won"

Action: Generate contract with company details, contact info, deal amount, and terms

Follow-up: Send to PandaDoc for signature, email link to sales rep

Result: Contract ready for signature within 60 seconds of closing the deal

Use Case 2: Proposal Generation from Qualified Deals

Trigger: Deal Stage changed to "Proposal Sent"

Action: Generate proposal with company info, solution summary, and pricing

Follow-up: Email PDF to the primary contact, log activity in HubSpot

Result: Proposals sent immediately when deals reach proposal stage

Use Case 3: Welcome Packet for New Customers

Trigger: Deal Stage changed to "Closed Won"

Action: Generate welcome packet with onboarding checklist, contact information, and next steps

Follow-up: Email to contact, create onboarding task in HubSpot

Result: New customers receive professional welcome materials instantly

Use Case 4: NDA Generation for New Contacts

Trigger: Contact Created (with specific criteria)

Action: Generate NDA with contact and company details

Follow-up: Attach to contact record, send for signature

Result: NDAs ready for new prospects before the first sales call

HubSpot vs. Salesforce Integration

If you're choosing between CRMs or curious how HubSpot compares for document automation:

FeatureHubSpotSalesforce
Free CRM Tier✅ Yes❌ No
Zapier Integration✅ Excellent✅ Excellent
Custom Properties✅ Easy to create✅ Requires admin
Associated Records✅ Contacts, Companies, Deals✅ Contacts, Accounts, Opportunities
Native Workflows✅ (Paid plans)✅ (Paid plans)
API Access✅ Free tier included❌ Enterprise only

HubSpot's free tier with API access makes it particularly accessible for small teams starting with document automation.

Time and Error Savings

Sales teams using HubSpot + Doc Variables integration report:

  • 15-30 minutes saved per contract — multiply by your monthly deal volume
  • Zero data entry errors — no more typos in client names or wrong amounts
  • Faster deal velocity — contracts sent within minutes of verbal agreement
  • Consistent branding — every document follows the same professional template
  • Better compliance — approved language used automatically, no rogue edits

For a team closing 30 deals per month, that's 7-15 hours saved monthly—nearly two full days of selling time recovered.

Getting Started

Ready to connect HubSpot to your Google Docs templates?

  1. Install Doc Variables from the Google Workspace Marketplace
  2. Create a template with variables matching your HubSpot properties
  3. Set up a Zap connecting HubSpot triggers to Doc Variables actions
  4. Test with a real deal to verify the data flows correctly
  5. Turn it on and watch contracts generate themselves

The free Doc Variables tier includes 20 document generations—enough to prove the concept. Once you see a contract appear in your Drive 30 seconds after marking a deal "Closed Won," you'll never go back to manual document creation.


Doc Variables is the top-rated template automation add-on for Google Workspace, trusted by 160,000+ professionals who automate their document workflows. Integrates with HubSpot, Salesforce, Zapier, and more.

Ready to try Doc Variables?

Join 190,000+ users creating amazing Google Doc templates.

Install Now - It's Free