Google Docs Integration
The Google Docs integration lets you automatically generate documents by copying a template document and replacing placeholders with record data. This is ideal for contracts, proposals, invoices, letters, and other standardized documents.
How It Works
- You create a template document in Google Docs with placeholders
- An automation action copies the template
- The copy has all placeholders replaced with actual record values
- The generated document is saved to your Google Drive
Connecting Your Google Account
Before using the Google Docs action, you need to connect a Google account:
- Go to Settings (gear icon in the sidebar)
- Navigate to the Integrations section
- Click "Connect Google Account"
- Sign in with your Google account and grant the requested permissions:
- Google Drive — to read templates and save generated documents
- Google Docs — to read and modify document content
- Once connected, the account appears in the integrations list
Note: The connected Google account must have access to the template document. If the template is in a shared drive, make sure the account has at least Viewer access.
Creating a Template Document
Create a new Google Docs document (or use an existing one) and add placeholders wherever you want dynamic data:
PASLAUGŲ SUTARTIS Nr. {{record.SutartiesNr}}
Šalys:
Užsakovas: {{record.Klientas}}, įmonės kodas {{record.ImonesKodas}}
Vykdytojas: UAB "Pavyzdys", įmonės kodas 123456789
Sutarties data: {{record.Data}}
Suma: {{record.Suma}} EUR
Placeholder Format
Placeholders use the same {{record.FieldName}} syntax as template syntax elsewhere in automations. This includes support for:
- Transforms:
{{record.Vardas|vocative_lt}} - Conditional blocks:
{{if record.Field equals "value"}}...{{/if}}
Template Tips
- Formatting is preserved: Bold, italic, font sizes, colors, tables — all formatting from the template carries over to the generated copy
- Use tables: For invoice line items or structured data, format them in a table in the template
- Headers and footers: Placeholders in headers and footers are also replaced
- Images: Static images in the template are preserved; dynamic image insertion is not supported
Setting Up the Automation Action
- Create an automation with an appropriate trigger (e.g., Record Updated where Status = "Approved")
- Add a Google Docs — Create Copy action
- Configure the action:
| Field | Description |
|---|---|
| Google Account | Select the connected Google account |
| Template Document | Browse or paste the URL of the template document |
| Output Folder | The Google Drive folder where the copy will be saved |
| Output File Name | Name for the generated file (supports template syntax, e.g., Invoice {{record.InvoiceNumber}} - {{record.ClientName}}) |
- The action runs and returns the URL of the generated document, which you can use in subsequent actions (e.g., send it via email)
Using the Generated Document URL
After the Google Docs action runs, the generated document URL is available as {{action.GoogleDocs.url}} in subsequent automation steps. Common follow-up actions:
- Send Email with the document URL in the body
- Update Record to store the document URL in a URL field
- HTTP Request to notify another system
Example: Auto-Generate Contract on Status Change
Trigger: Record Updated in "Deals" table
Filter: Status changed to "Contract Sent"
Actions:
1. Google Docs — Create Copy
Template: "Contract Template 2024"
Output folder: "Generated Contracts"
Output name: "Contract - {{record.CompanyName}} - {{record.DealNumber}}"
2. Update Record
Set "Contract URL" = {{action.GoogleDocs.url}}
3. Send Email
To: {{record.ContactEmail}}
Subject: Your contract is ready — {{record.DealNumber}}
Body: Please review your contract: {{action.GoogleDocs.url}}
Troubleshooting
| Problem | Solution |
|---|---|
| "Template not found" error | Ensure the connected Google account has access to the template document |
| Placeholders not replaced | Check that placeholder field names match your table field names exactly (case-sensitive) |
| Document created but empty | The template may be in a format Google Docs cannot fully parse — recreate it as a native Google Doc |
| Permission denied on output folder | Make sure the connected account has Editor access to the output folder |
| Rate limit errors | Google API has per-minute quotas. If generating many documents at once, add delays between automation runs |