> ## 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.

<Tabs>
  <Tab title="5 Minute Run Through">
    <Frame>
      <iframe width="100%" height="400" src="https://www.youtube.com/embed/FLS3Gsq8s28" title="Google Sheets - 5 Minute Run Through" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />
    </Frame>
  </Tab>

  <Tab title="Full Demo">
    <Frame>
      <iframe width="100%" height="400" src="https://www.youtube.com/embed/81k7YV4n5Zw" title="Google Sheets - Full Demo" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />
    </Frame>
  </Tab>
</Tabs>

## Key Features

<CardGroup cols={2}>
  <Card title="Primary Sheet Processing" icon="file-spreadsheet">
    Documents are generated from rows in your primary sheet
  </Card>

  <Card title="Linked Sheets" icon="link">
    Line items can be added from related sheets
  </Card>

  <Card title="Automatic PDF Storage" icon="hard-drive">
    Generated PDFs save to specified columns automatically
  </Card>

  <Card title="Flexible Triggers" icon="bolt">
    Choose between auto-creation, webhooks, or Apps Script buttons
  </Card>
</CardGroup>

## Step-by-Step Setup

<Steps>
  <Step title="Create an Automation">
    Initialize a new automation in your DocsAutomator account.
  </Step>

  <Step title="Select Data Source">
    Choose Google Sheets as your data integration source.
  </Step>

  <Step title="Choose Template">
    Select or create a Google Doc template to use as your document foundation.
  </Step>

  <Step title="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)
  </Step>

  <Step title="Select Your Google Sheet">
    Connect your specific spreadsheet to the automation.
  </Step>

  <Step title="Define Primary Sheet">
    Identify which sheet contains your primary records.
  </Step>

  <Step title="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
  </Step>

  <Step title="Map Placeholders">
    Connect template placeholders to spreadsheet columns. AI-assisted mapping is available.
  </Step>

  <Step title="Configure Line Items (Optional)">
    Select the line item sheet, set the primary column for matching, and map line item placeholders to columns.
  </Step>

  <Step title="Create Previews">
    Test document generation using sample rows before full deployment.
  </Step>

  <Step title="Setup Document Creation Trigger">
    Choose your preferred triggering method.
  </Step>
</Steps>

## Triggering Methods

<Tabs>
  <Tab title="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.

    <Info>
      Perfect for hands-off automation where documents should be created as soon as data is added.
    </Info>
  </Tab>

  <Tab title="Webhook Formula">
    Simple sheet formula creates on-demand generation links.

    <Tip>
      Add a formula to create clickable links that trigger document generation when clicked.
    </Tip>

    <Info>
      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.
    </Info>
  </Tab>

  <Tab title="Apps Script">
    Custom menu button for batch generation. Ideal for generating multiple documents at once.
  </Tab>
</Tabs>

## Additional Features

<AccordionGroup>
  <Accordion title="Dynamic Images" icon="image">
    Add images via column links. Separate multiple images with commas.
  </Accordion>

  <Accordion title="PDF Settings" icon="file-pdf">
    Configure expiration periods for generated PDFs under template options.
  </Accordion>

  <Accordion title="Google Docs Saving" icon="file-lines">
    Enable Google Doc generation and specify storage location and Drive folder.
  </Accordion>

  <Accordion title="PDF Storage" icon="folder">
    Save generated PDFs to Google Drive with optional custom folder paths.
  </Accordion>

  <Accordion title="Email Distribution" icon="envelope">
    Send documents automatically with dynamic parameters and conditional logic.
  </Accordion>
</AccordionGroup>

## E-Signatures

DocsAutomator supports collecting legally binding e-signatures on documents generated from Google Sheets rows. After a document is created, it can be automatically routed to one or more signers.

To enable e-signatures, open your automation's output settings and toggle on the e-signature option. Map signer email and name to columns in your spreadsheet using placeholder names like `{{client_email}}` and `{{client_name}}`. Add e-signature placeholders such as `{{esign.signature.1}}` and `{{esign.date.1}}` to your template to control where signatures appear.

You can configure **sequential signing** (signers sign in order) or **parallel signing** (all signers receive the request at the same time). When all parties have signed, the completed PDF is available via the signing session and can be delivered via email or webhook.

<Info>
  E-signatures work with both Google Doc templates and [PDF templates](/docsautomator-basics/pdf-template-guide). See the [E-Signature Guide](/features/docsautomator-esign) for full configuration details and placeholder reference.
</Info>

## Next Steps

<CardGroup cols={2}>
  <Card title="Line Items" icon="list" href="/features/line-items">
    Learn how to add tables and repeating rows
  </Card>

  <Card title="Send Email" icon="envelope" href="/features/actions-after-document-generation/send-email">
    Configure automatic email delivery
  </Card>

  <Card title="Save PDFs to Drive" icon="hard-drive" href="/features/actions-after-document-generation/save-pdfs-in-google-drive">
    Store PDFs in Google Drive folders
  </Card>

  <Card title="Template Guide" icon="file-lines" href="/docsautomator-basics/google-doc-template-guide">
    Master the template syntax
  </Card>
</CardGroup>
