Creating a template from a Google Doc
If you already design your documents in Google Docs, you don't have to rebuild them in DocuPotion. Point DocuPotion at a Google Doc, add a few merge fields, and it becomes a live template you can fill with your data.
Your original formatting, fonts, tables, and page layout come through exactly as you designed them in Google Docs.
- Connect your Google Drive
- Create the template
- Add merge fields to your Doc
- Repeating rows and totals (line items)
- Preview and download a sample
- Editing your template (always live)
- Generating documents
- Good to know
1. Connect your Google Drive
From your Templates dashboard, click New Template and choose the Google Doc option. The first time you do this, DocuPotion asks you to connect your Google account. Click Connect Google Drive and sign in with Google.
What DocuPotion can and can't see
DocuPotion asks for the narrowest Google permission available. It can only see the specific Docs you pick or the ones it creates for you, never the rest of your Drive. It never reads, edits, or deletes anything else in your account.
2. Create the template
Once your Drive is connected, you have two ways to start:
- Use an existing Google Doc. Pick a Doc you've already designed. DocuPotion uses it as the template as-is.
- Start from a blank Doc. DocuPotion creates a fresh Google Doc in your Drive for you to design from scratch.

Either way, the Doc lives in your Google Drive. You design and edit it in Google Docs, the tool you already know. DocuPotion reads from it whenever you generate a document.
3. Add merge fields to your Doc
A merge field is a placeholder you type directly into your Google Doc, wrapped in double curly braces. When you generate a document, DocuPotion swaps each placeholder for the real value you send.
For example, type this in your Doc:
Invoice for {{customer_name}}
Invoice number: {{invoice_no}}
Amount due: {{total}}

There are two main kinds of merge fields:
| Field | What it does |
|---|---|
{{field_name}} |
Substitutes a single value, for example a name, date, or total. |
{{#list_name}} ... {{/list_name}} |
Repeats the wrapped content once for each item in a list (line items, attendees, transactions). See below. |
Field names must match exactly
If your Doc says {{invoice_no}} , the data you send when generating must use invoice_no too, not invoiceNumber or invoice_number . Pick a naming style early and stick with it.
Note: This doesn't apply if you're mapping data to template fields using our bulk spreadsheet generator or Airtable integration.
4. Repeating rows and totals (line items)
To repeat a table row for every item in a list, put the opening tag at the start of the row and the closing tag at the end, and reference each item's fields inside:

In a table row, that looks like:
{{#line_items}} | {{description}} | {{quantity}} | {{unit_price}} | {{line_total}} | {{/line_items}}
DocuPotion clones that row once per item in your line_items list, so a three-item order produces three rows. Everything outside the row stays put.
Totals and other calculations. You can total a column without sending the number yourself. Inside or after a line-item table, use a formula field:
| Formula | Result |
|---|---|
{{=SUM(line_total)}} |
Adds up line_total across every row. |
{{=AVG(line_total)}} |
Averages the values. |
{{=COUNT(line_total)}} |
Counts the rows. |
{{=MIN(line_total)}} / {{=MAX(line_total)}} |
Smallest / largest value. |
You can use more than one line-item table in the same Doc (for example, an order summary and a separate payment schedule). Each is filled independently from its own list.
5. Preview and download a sample
Back in DocuPotion, use Download Sample to generate a test PDF from your Doc filled with sample data. This is the quickest way to check that your merge fields, repeating rows, and totals all land where you expect before you send real data.

Sample documents are watermarked and don't count against your document allowance, so preview as often as you like.
6. Editing your template (always live)
Google Docs templates work a little differently from DocuPotion's AI and PDF templates: there's no separate publish step. Your Google Doc is the template. When you edit the Doc in Google Docs (change the wording, adjust the layout, add or rename a merge field), the very next document you generate uses those changes.
Edits go live immediately
Because there's no draft-versus-published split, be mindful that a change you make in the Google Doc affects live generation right away. If you want to experiment, work on a copy of the Doc and point the template at it when you're happy.
7. Generating documents
Once your template has merge fields, you can fill it the same ways as any other DocuPotion template:
- One at a time, via the REST API or an integration (Airtable, Zapier, n8n, Make, Bubble), passing your data and the template's ID.
- In bulk from a spreadsheet, upload a CSV or spreadsheet and DocuPotion generates one document per row. See Creating documents from a spreadsheet.
Bulk runs: up to 500 rows per job for Google Docs templates
Google Docs templates render by driving Google's own Docs service, which rate-limits how fast documents can be produced. To keep every run reliable, a single bulk job for a Google Docs template is capped at 500 rows. For larger jobs, split your spreadsheet into batches of 500 or fewer. (AI and PDF templates have a much higher limit; the 500-row cap is specific to Google Docs.)
Every generated document is named after your template.
8. Good to know
- Your original is never touched. To render, DocuPotion makes a temporary copy of your Doc in your Drive, fills the copy, exports it to PDF, and deletes the copy. Your source Doc is left exactly as it was.
- One connected Google account. Templates render using the Google account you connected. If you disconnect that account, Google Docs templates that rely on it will stop generating until you reconnect.
- Keep merge fields intact. Make sure each merge field keeps its full
{{ }}wrapper. An opening tag with no matching close (for example{{customer_name) can cause the rest of the document to render incorrectly. - Formatting comes from Google Docs. Fonts, colours, spacing, headers, footers, and page size are whatever you set in the Doc. To change how the document looks, edit the Doc.