Google Sheets integration

Generate PDFs from Google Sheets

Connect Quaterio to a public Google Sheet with a Cloud API key, bind cells and ranges to block-based templates and render paginated PDFs. Best fit for invoices, line item tables and batch jobs sourced from a shared sheet.

The problem

Google Sheets is where most teams keep their structured tabular data. PDF output is a partial story, Sheets has File → Download → PDF, but it exports the sheet itself, not a designed document. Invoices, contracts and customer-facing reports need a designer’s layout, not a tabular dump.

How Quaterio handles it

Quaterio's Google Sheets connector hits the values.get endpoint with an API key in the URL. You bind specific cells or ranges to template blocks and Quaterio renders the data into a designed PDF. For batch jobs, one row per PDF lets you generate hundreds of personalized documents from a single sheet.

How it works

  1. 1

    Share the sheet as "Anyone with the link"

    In Google Sheets, click Share → change "Restricted" to "Anyone with the link" → set permission to Viewer. The API key path only reads sheets that allow link-based public viewing. Private sheets need OAuth, which the connector does not currently support.

  2. 2

    Generate a Google Cloud API key

    In Google Cloud Console, create or pick a project. Enable the Google Sheets API under APIs & Services → Library. Then APIs & Services → Credentials → Create Credentials → API key. Lock it down to the Sheets API only.

  3. 3

    Pick the Google Sheets preset in Connections

    Settings → Connections → New Connection → pick "Google Sheets" from the type dropdown. Replace SHEET_ID with your sheet ID (the long string in the URL between /d/ and /edit), set the range (e.g. Sheet1!A1:Z) and paste the API key into ?key=.

  4. 4

    Generate the PDF via the editor or API

    Export from the editor for one-offs. For batch jobs, store row-per-PDF data in the sheet and hit POST /api/v1/generate/batch with rows[] sourced from the same sheet. The connector re-fetches at generation time.

What the connector handles

  • Google Sheets v4 values.get API for ranges, single rows or single cells
  • API key authentication via ?key= in the URL
  • A1 range syntax: Sheet1!A1:Z, Sheet1!A:A, Sheet1!1:1, full-sheet reads
  • FORMATTED_VALUE default (matches what users see in the sheet)
  • UNFORMATTED_VALUE and FORMULA options for raw numbers or formula auditing
  • majorDimension parameter for row-oriented or column-oriented reads
  • Batch endpoint pattern: one row per PDF for personalized batch generation
  • Detect Fields walks the 2D grid so you can pick exact cells in the editor
  • Honest about sharing: API key path needs "Anyone with the link can view"
  • 15 second fetch timeout, cached on the block when Sheets is slow or unreachable

Generate via API

# 1. Create the connection via the dashboard (one-time setup). # 2. Bind a template's Remote Content block to it. # 3. Generate a PDF that pulls live Sheets data: curl -X POST https://quaterio.com/api/v1/generate/template \ -H "Authorization: Bearer q_your_token" \ -H "Content-Type: application/json" \ -d '{ "templateId": "sheets_invoice_export" }' # → { # "ok": true, # "data": { "downloadUrl": ".../invoice_en_a7f3b2c1.pdf" } # } # The connector hits values.get at generation time and drops # the cell or range into the bound template block.

Available on Business plan and above.

Google Sheets and PDF: the real questions

The Google Sheets preset uses values.get on the Sheets v4 API. You need a sheet shared as "Anyone with the link can view" plus a Google Cloud API key, or, for private sheets, an OAuth setup that the current connector does not handle. The sections below cover the sharing model, range syntax, 2D array gotchas and tier requirements.

API key vs OAuth, which one this connector supports

Google's Sheets API supports both API keys and OAuth. API keys work for spreadsheets shared with "Anyone with the link can view", the request is treated as public-anonymous. OAuth is required for private sheets, sheets shared only with specific accounts and writes.

The current Quaterio connector supports the API key path only. If your data lives in a private sheet, the cleanest workaround is to publish a read-only copy ("Anyone with the link, view only") for the columns Quaterio needs. OAuth support is on the roadmap; raise it with us if you need it for your case.

Generating a Google Cloud API key

Open console.cloud.google.com, pick or create a project, go to APIs & Services → Library and enable the Google Sheets API. Then APIs & Services → Credentials → Create Credentials → API key. Copy the key from the modal and paste it into ?key= on the Quaterio connection URL.

Lock the key down. In the key settings, restrict it to the Google Sheets API only and add HTTP referrer or IP restrictions if your Quaterio environment has a stable egress IP. Leaked API keys with no restrictions are a common security incident.

Range syntax and spreadsheetId

The spreadsheetId is the long opaque string in the sheet URL between /d/ and /edit. Copy it once and reuse for every range request. The range parameter uses A1 notation, Sheet1!A1:Z reads all columns A through Z on Sheet1 from row 1.

Common ranges: Sheet1!A:A (entire column A), Sheet1!1:1 (first row only, headers), Sheet1!A1:E10 (fixed rectangle), Sheet1 (everything). Quaterio passes the range straight through; encode the exclamation mark as %21 if your URL parser dislikes the bare character.

The 2D array response shape

Google returns { range, majorDimension, values } where values is a two-dimensional array, rows of columns. The default Response Field "values" returns the full grid; for a single cell use values.0.0 (first row, first column). For a single row use values.0; for a single column use sequential paths values.0.2, values.1.2 etc.

This is the trickiest part of binding sheets to PDFs. If your headers are in row 1 and data starts at row 2, the field "customer_name" in row 2 column B is values.1.1, not values.customer_name.1. Use Detect Fields to walk the grid and pick the right cell.

Formatted vs unformatted values

By default values returns FORMATTED_VALUE, the way the cell appears in the UI. Dates are localized strings, numbers have your sheet's thousand separators, percentages have the percent sign. This is usually what you want for PDFs.

For numerical work pass ?valueRenderOption=UNFORMATTED_VALUE on the URL, you get raw JSON numbers instead of strings. For formula auditing use FORMULA, you see the formula text rather than the result. Each option is set on the connection URL; rebuild the URL for each pattern.

Best fit: small structured grids, single rows, lookup tables

Google Sheets is a great PDF source for invoice line items, price lists, simple product specs and "one row per PDF" batch jobs. For longer prose, image-heavy content or anything with structured fields, a dedicated CMS connector is a better fit.

A pattern that works well: keep a sheet with one row per PDF you need to generate. Each row holds the variables (customer name, total, due date). Trigger the Quaterio batch endpoint with rows[] in the request body, sourced from the same sheet via Apps Script or a Zap. Sheets fronts the data, Quaterio renders the PDFs.

Rate limits and quotas

Google's standard Sheets API quota is 300 read requests per minute per project and 60 read requests per minute per user. Both are usually plenty for PDF generation. The standard Quaterio batch concurrency (5) is well within limits.

If you hit 429 responses, lower the batch concurrency or request a quota increase from the Google Cloud Console. Sheets API quota increases are usually approved within a few business days for legitimate workloads.

Pricing and plan tier

CMS connections are part of the Quaterio Business plan and above ($30/mo). Pro plans get the editor and basic templates but not the Remote Content block. Free and Pro users who try to add a Remote Content block see an upgrade prompt.

The Google Sheets API is free for the standard quota tier on Google Cloud. No billing account is required as long as you stay within free usage limits. Workspace accounts include Sheets at no extra cost.

Try the Google Sheets connector free

Set up the connection in two minutes. No credit card required to start.