Skip to main content

Google Docs template in Power Automate

The Google Docs family is a Power Automate Generate Document Single option that uses a template designed in Google Docs and exported as .docx. Map that file into Generate Document Single, merge it with your JSON or XML data, and get a personalized PDF or Word file back. Choose it when your team authors templates in Google Docs rather than Microsoft Word.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog

Before You Start

Google Docs exported as .docx
Design the template in Google Docs, add placeholders, then download it as Microsoft Word (.docx). The sample google-docs-template.docx is already exported and ready.
Matching data file
Use google-docs-data.json (recommended), test.xml, or test.csv. The placeholder names in the template match the data keys.
PDF4me connection in Power Automate
Create a PDF4me connection in Power Automate and paste your API key. The same key works across every PDF4me action in your tenant.

Sample File Pack

Download the files below. One Google Docs template plus matching data in JSON, XML, and CSV. Map the .docx from SharePoint, OneDrive, or Dropbox into Generate Document Single.

PDF4me Generate Document Word Single action in Power Automate with Template File Type set to Docx, Template File Name linq-template.docx, Template File Data mapped from Dropbox File Content, Document Data Type Json, and Document Data Text holding sample JSON

Target configuration for a Google Docs export: map the .docx under Template File Data, set Template File Type to Docx, and paste JSON into Document Data Text.

What is the Google Docs template in Power Automate?

The Google Docs family lets you author a template in Google Docs, export it as .docx, and merge it with data in a Power Automate flow. Because the exported file is a .docx, it runs through the Word template engine and supports mustache-style placeholders such as {{name}}. It is the simplest option for teams that prefer Google Workspace over Microsoft Word for template design.

How do I configure Google Docs template in Power Automate?

Set the action fields as below. Generate Document Single maps the exported .docx from a prior Get file step. For a template already saved in your PDF4me account, use Generate Document Using Template instead.

ParameterRequiredWhat it doesExample
ConnectionRequiredPDF4me connection for the flow. Create one with your API key, then reuse it across every PDF4me action.My PDF4me connection
Template File TypeRequiredFormat of the template file. A Google Docs export is a .docx, so choose PDF4me Word Template (Docx).PDF4me Word Template
Output TypeRequiredFormat of the generated document. PDF for a locked layout, or Word for an editable .docx.PDF
Template NameRequiredFilename of the exported template including the .docx extension. Map from the prior Get file step.google-docs-template.docx
TemplateRequiredBinary content of the Google Docs export. Map File Content from SharePoint, OneDrive, or Dropbox Get file content.File Content
Document DataTypeRequiredFormat of the data payload. Json maps cleanly from SharePoint columns and Forms. Xml is for XML source systems.Json
Document Data TextConditionalInline data payload built from dynamic content. Required when Document Data File is empty.[{ "name": "Alice Johnson" }]
Document Data FileConditionalA JSON or XML data file mapped from a prior step. Required when Document Data Text is empty.1. Data
Meta Data JsonOptionalDocument metadata for fields in JSON format. Leave empty for most certificate and letter templates.{"title":"Certificate"}

The sample data below matches the placeholders in google-docs-template.docx. Paste it into Document Data Text, or upload it as a file into Document Data File.

[
{
"name": "Alice Johnson",
"course": "Intro to Automation",
"date": "2026-03-10",
"instructor": "Mr. Smith"
}
]

Output

The action returns the generated document as dynamic content. Map it into any downstream step that accepts file content.

FieldTypeWhat it contains
Doc DataBinaryThe merged document produced from the Google Docs export and your data. Map it into File Content of Create file (Dropbox, OneDrive, SharePoint) or into an Outlook attachment.
File NameStringOutput filename derived from Template Name. Combine it with an expression such as guid() when you want unique filenames per run.
Dropbox Create file action in Power Automate with Folder Path set to pdf4meoutput, File Name built from guid() plus the generated document, and File Content mapped to the generated document

Saving the result: map the generated document into File Content, and use guid() in File Name for a unique output name.

Production patterns

Common Power Automate patterns for Google Docs templatesReplace the manual test with these once the sample works.
Forms response to certificate
  1. Microsoft Forms When a new response is submitted trigger fires.
  2. Generate Document Single maps the Google Docs certificate .docx from Get file content.
  3. The response fields are passed as JSON in Document Data Text.
  4. Create file saves the certificate and Outlook Send an email delivers it.
SharePoint list to stored PDF
  1. SharePoint When an item is created trigger fires on a list.
  2. Generate Document Single merges the list columns into the template.
  3. The generated document is returned as dynamic content.
  4. SharePoint Create file stores it in a document library.
Manual test to Dropbox
  1. Manually trigger a flow starts the run.
  2. Generate Document Single maps google-docs-template.docx with inline JSON.
  3. Create file writes to /pdf4meoutput with a guid() filename.
  4. Swap the manual trigger for a real trigger once verified.

Frequently Asked Questions

How do I prepare a Google Docs template for Power Automate?+
Design the document in Google Docs, add placeholders, then use File, Download, Microsoft Word (.docx). Map that file into Generate Document Single from SharePoint, OneDrive, or Dropbox. If the template is already saved in your PDF4me account, use Generate Document Using Template instead.
Which Template File Type do I select for a Google Docs export?+
Set Template File Type to PDF4me Word Template. A Google Docs export is a .docx, so it merges through the Word template engine. Set Output Type to PDF or Word.
Can the action output PDF or Word from a Google Docs template?+
Yes. Set Output Type to PDF or Word on Generate Document Single. The exported Google Docs file is a .docx, so either output format is valid.
What data formats can I use with the Google Docs template?+
Set Document DataType to Json or Xml. Document Data Text takes an inline payload built from dynamic content, and Document Data File takes an uploaded JSON or XML file. The sample pack includes google-docs-data.json, test.xml, and test.csv.
Where does the generated file go in a Power Automate flow?+
The action returns Doc Data as dynamic content. Map it into a downstream step such as Create file (Dropbox, OneDrive, SharePoint) or Outlook Send an email with attachment. Use guid() in the File Name to keep each output unique.

For the underlying template engine, see the Aspose Words for .NET documentation and the Power Automate expressions reference.