> ## Documentation Index
> Fetch the complete documentation index at: https://docsautomator.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Sheets

> Generate documents from spreadsheet data with automatic PDF storage

DocsAutomator's Google Sheets integration enables rapid document generation from spreadsheet data. The system operates on a primary sheet and linked sheets basis, converting rows into professional PDFs or Google Docs.

> [tab] 5 Minute Run Through
>
> [Google Sheets - 5 Minute Run Through](https://www.youtube.com/embed/FLS3Gsq8s28)

> [tab] Full Demo
>
> [Google Sheets - Full Demo](https://www.youtube.com/embed/81k7YV4n5Zw)

## Key Features

> [card] Primary Sheet Processing
>
> Documents are generated from rows in your primary sheet

> [card] Linked Sheets
>
> Line items can be added from related sheets

> [card] Automatic PDF Storage
>
> Generated PDFs save to specified columns automatically

> [card] Flexible Triggers
>
> Choose between auto-creation, webhooks, or Apps Script buttons

## Step-by-Step Setup

**1. Create an Automation**

Initialize a new automation in your DocsAutomator account.

**2. Choose Your Template**

Every automation needs a template. Use a Google Doc, a Word (.docx) file, or a PDF. Create one with AI, browse the template library, start from scratch, or drag your own file in. See the [Google Doc Template Guide](https://docsautomator.co/docs/docsautomator-basics/google-doc-template-guide.md), the [Word Template Guide](https://docsautomator.co/docs/docsautomator-basics/word-template-guide.md), or the [PDF Template Guide](https://docsautomator.co/docs/docsautomator-basics/pdf-template-guide.md).

**3. Connect Google Sheets**

Open the **Data / Placeholders** panel, click **Connect**, and choose Google Sheets.

**4. Prepare Your Spreadsheet**

Structure your sheet with:

* Header row with column titles (required)
* Primary sheet containing main document data
* Linked sheets for related line items (optional)

**5. Select Your Google Sheet**

Connect your specific spreadsheet to the automation.

**6. Define Primary Sheet**

Identify which sheet contains your primary records.

**7. Configure Key Columns**

Set up the following columns:

* **Primary Column**: Identifies rows (e.g., Invoice Number)
* **Document Name Column**: Unique identifier for generated documents
* **PDF Link Column**: Where generated PDF links are stored

**8. Map Placeholders**

Connect template placeholders to spreadsheet columns. AI-assisted mapping is available.

**9. Configure Line Items (Optional)**

Select the line item sheet, set the primary column for matching, and map line item placeholders to columns.

**10. Create Previews**

Test document generation using sample rows before full deployment.

**11. Setup Document Creation Trigger**

Choose your preferred triggering method.

## Triggering Methods

> [tab] Auto-Create
>
> The system checks every 5 minutes for new rows and automatically generates documents. Enable it from your automation's settings under the Google Sheets section.
>
> **How it works:**
>
> * DocsAutomator tracks a "last processed row" cursor for each automation
> * Every 5 minutes, it checks your sheet for rows after that cursor
> * New rows are queued for document creation automatically
> * Up to 50 new rows are processed per polling cycle
>
> **Controls:**
>
> * **Editable cursor** — Click the last processed row number to change it. Set it lower to re-process rows, or higher to skip rows.
> * **Skip to end** — Sets the cursor to the last row in your sheet, so only future rows are processed.
> * **Run Now** — Triggers an immediate poll without waiting for the next 5-minute cycle.
>
> **Automatic safety shutoff:**
> Auto-creation is automatically disabled in two cases, and workspace owners receive an email notification:
>
> * **Polling failures** — If checking your sheet fails 5 times in a row (e.g., disconnected Google account, deleted sheet)
> * **Document creation failures** — If 5 consecutive polling cycles result in all documents failing (e.g., broken template, missing permissions)
>
> Fix the underlying issue and re-enable auto-creation to resume.
>
> > [!NOTE]
> >
> > Perfect for hands-off automation where documents should be created as soon as data is added.

> [tab] Webhook Formula
>
> Simple sheet formula creates on-demand generation links.
>
> > [!TIP]
> >
> > Add a formula to create clickable links that trigger document generation when clicked.
>
> > [!NOTE]
> >
> > When you click a generation link, DocsAutomator opens a **"Generate this document?"** confirmation page, and the document is created only after you click **Generate document**. This prevents accidental duplicates from browser link prefetching, link scanners, or double-clicks. If the same generation is re-submitted (a double-click or a page refresh), it is treated as a duplicate and not generated again, with a **Generate another copy** option for when you want a second document on purpose.

> [tab] Apps Script
>
> Custom menu button for batch generation. Ideal for generating multiple documents at once.

## Additional Features

> [accordion] Dynamic Images
>
> Add images via column links. Separate multiple images with commas.

> [accordion] PDF Settings
>
> Configure expiration periods for generated PDFs under template options.

> [accordion] Google Docs Saving
>
> Enable Google Doc generation and specify storage location and Drive folder.

> [accordion] PDF Storage
>
> Save generated PDFs to Google Drive with optional custom folder paths.

> [accordion] Email Distribution
>
> Send documents automatically with dynamic parameters and conditional logic.

## E-Signatures

Documents generated from Google Sheets rows can go out for signature or one-click acceptance in the same step, and a link to the sealed PDF comes back to the row.

Open the automation's **Signing & Acceptance** card. Under **How it completes**, pick one of three options:

* **Signature required**: the recipients sign the document. These are legally binding e-signatures, with an audit trail and a certificate.
* **Acceptance**: the recipient clicks Accept, for example on a quote or a proposal. See [Acceptance](https://docsautomator.co/docs/features/docsautomator-esign/acceptance.md).
* **No closing step**: documents are delivered without a signing or acceptance request.

Map each signer's email address and name to columns in your sheet, for example a "Client Email" column and a "Client Name" column. With more than one signer, choose **Sequential** (signers sign in order) or **Parallel** (all signers get the request at the same time).

Place signing tags such as `{{esign.signature_1}}` and `{{esign.date_1}}` in your template where signatures and dates should appear. The number is the signer. The [E-Signature Guide](https://docsautomator.co/docs/features/docsautomator-esign.md#adding-esign-fields-to-templates) lists every tag, including text and checkbox fields.

Under **After signing**, set **Save Signed PDF To** to a column. When the last person signs or accepts, DocsAutomator writes a link to the sealed PDF into that column of the row. With signing, **Save Field Values To** writes the text, checkbox and date values the signers enter into columns.

E-signing and acceptance are included in every plan. See [How e-signing and acceptance are billed](https://docsautomator.co/docs/features/docsautomator-esign.md#how-e-signing-and-acceptance-are-billed).

> [!NOTE]
>
> E-signatures work with both Google Doc templates and [PDF templates](https://docsautomator.co/docs/docsautomator-basics/pdf-template-guide.md). See the [E-Signature Guide](https://docsautomator.co/docs/features/docsautomator-esign.md) for full configuration details and placeholder reference.

## Next Steps

> [card] [Line Items](https://docsautomator.co/docs/features/line-items.md)
>
> Learn how to add tables and repeating rows

> [card] [Send Email](https://docsautomator.co/docs/features/actions-after-document-generation/send-email.md)
>
> Configure automatic email delivery

> [card] [Save PDFs to Drive](https://docsautomator.co/docs/features/actions-after-document-generation/save-pdfs-in-google-drive.md)
>
> Store PDFs in Google Drive folders

> [card] [Template Guide](https://docsautomator.co/docs/docsautomator-basics/google-doc-template-guide.md)
>
> Master the template syntax


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.