Google Drive and Docs Automation: Generate Documents from Data
· By AI Compare
Fill Google Docs templates from sheet or CRM data, export PDFs and email them automatically.
Generate documents from data
Contracts, proposals, invoices, certificates and reports often follow the same template with different names, numbers and dates. Instead of copying a document and editing it by hand, an automation fills a template from a sheet, form or CRM and saves the result as a Google Doc or PDF.
How templates work
Create a Google Doc with placeholders such as {{client_name}}, {{amount}} and {{date}}. The automation:
- Copies the template.
- Replaces each placeholder with real data.
- Optionally exports the copy as PDF.
- Saves it to the right Drive folder and shares or emails it.
The example: new deal → proposal PDF → email
In Zapier
- Trigger: Google Sheets → New Spreadsheet Row (or HubSpot deal stage changed).
- Google Docs → Create Document from Template: pick the template, map each placeholder to a field.
- Google Drive → Copy File / Convert or use the file's export link to get a PDF.
- Gmail → Send Email with the PDF attached.
In Make
- Google Sheets → Watch New Rows.
- Google Docs → Create a Document from a Template: Make reads the
{{tags}}in your template and shows a field for each one. - Google Drive → Download a File with conversion to PDF.
- Gmail → Send an Email with the downloaded file as an attachment.
- Google Sheets → Update a Row to store the document link.
In n8n
- Google Sheets Trigger (row added).
- Google Drive node: Copy the template file into the client folder.
- Google Docs node: Update the copy with Replace All Text actions for each placeholder.
- Google Drive node: Download with Google file conversion to PDF.
- Gmail node: send with the binary PDF attached.
n8n takes a couple more nodes, but you control every step and can add conditions (different template per country or language) with a Switch node.
Other Drive automations
- Save every email attachment to Drive (see Gmail automation).
- New file in a folder → notify Slack and log it in a sheet.
- Organise uploads into folders by client name.
- New PDF in Drive → extract text with AI → add a summary row to Sheets.
Comparison
| Zapier | Make | n8n | |
|---|---|---|---|
| Template placeholders | Native action | Native, auto-detects tags | Copy + Replace text nodes |
| PDF export | Workaround | Download with conversion | Download with conversion |
| Multiple templates by condition | Paths | Router | Switch |
Tips
- Keep templates in a locked folder and generate copies elsewhere.
- Use unique placeholder names that will never appear in normal text.
- Store the generated file URL back in your sheet or CRM for traceability.
