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

  1. You create a template document in Google Docs with placeholders
  2. An automation action copies the template
  3. The copy has all placeholders replaced with actual record values
  4. 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:

  1. Go to Settings (gear icon in the sidebar)
  2. Navigate to the Integrations section
  3. Click "Connect Google Account"
  4. 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
  5. 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

  1. Create an automation with an appropriate trigger (e.g., Record Updated where Status = "Approved")
  2. Add a Google Docs — Create Copy action
  3. Configure the action:
FieldDescription
Google AccountSelect the connected Google account
Template DocumentBrowse or paste the URL of the template document
Output FolderThe Google Drive folder where the copy will be saved
Output File NameName for the generated file (supports template syntax, e.g., Invoice {{record.InvoiceNumber}} - {{record.ClientName}})
  1. 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

ProblemSolution
"Template not found" errorEnsure the connected Google account has access to the template document
Placeholders not replacedCheck that placeholder field names match your table field names exactly (case-sensitive)
Document created but emptyThe template may be in a format Google Docs cannot fully parse — recreate it as a native Google Doc
Permission denied on output folderMake sure the connected account has Editor access to the output folder
Rate limit errorsGoogle API has per-minute quotas. If generating many documents at once, add delays between automation runs