Google Sheets automation
Connect a Google Sheet to Automette so that editing a row triggers document generation — and the PDF link is written back to the sheet automatically.
Prerequisites
- An Automette template with fields that match your sheet columns
- A Google Sheets spreadsheet with column headers in row 1
- A Google account connected in Automette (used for the spreadsheet picker and write-back)
Step 1 — Connect your Google account
Go to Automations → New Automation and choose Google Sheets as the source. If you haven't connected a Google account yet, click Connect Google Sheets and follow the OAuth flow. Automette requests:
- Google Sheets access — to read column headers and write the PDF URL back
- Google Drive (read-only) — to search and pick spreadsheets by name
Once connected, your Google account appears as a named connection (e.g. "Google Sheets (you@gmail.com)").
Step 2 — Choose your spreadsheet and sheet tab
Use the spreadsheet search to find the file you want to use, then pick the sheet tab (the tab name at the bottom of the spreadsheet — e.g. "Sheet1", "Invoices").
Step 3 — Set the trigger condition
Choose the trigger column — the column whose value should kick off generation. Then set the trigger value — the exact value that column must contain.
Example: Trigger column = Status, trigger value = Ready — the automation runs whenever someone sets a row's Status column to "Ready".
The match is case-insensitive and ignores leading/trailing spaces. Other edits to the same row (other columns, other values) are ignored.
Step 4 — Map sheet columns to template fields
You'll see your template's fields on the left and dropdowns to pick the matching sheet column on the right. Every mapped field is filled from that column in the triggering row. Fields you leave unmapped use the template's default value.
Example:
| Template field | Sheet column |
|---|---|
client_name | Company |
invoice_number | Invoice No |
invoice_date | Invoice Date |
due_date | Due Date |
Step 5 — Choose outputs
Pick what happens after the document is generated:
- Write URL to sheet — Automette writes the PDF link back into a column you specify. Choose which column should receive the link.
- Send to webhook — POST the result to a URL of your choice for further processing.
Step 6 — Install the Apps Script bridge
Google Sheets doesn't push edit events to third-party apps directly. The Install tab generates a small Apps Script that is specific to your automation — the automation ID, secret, trigger column, and sheet tab are all baked in.
To install it:
- Open your Google Sheet
- Go to Extensions → Apps Script
- Delete any existing code in the editor
- Paste the generated script
- Click Save (floppy disk icon)
- In the toolbar, change the function dropdown to
setupand click Run - Grant the requested permissions when prompted — this is a one-time step; the script runs under your Google account
Once installed, the script fires on every edit, checks whether the edited row is in the configured tab and whether the trigger column matches, and only contacts Automette when it does. You do this once per automation.
Step 7 — Test it
Edit a row in your sheet and set the trigger column to your trigger value. The document should generate within a few seconds and the PDF link should appear in the output column.
Check History to see the run with an Automation source badge. If the document doesn't appear after 10–15 seconds, check that the Apps Script ran without errors (Extensions → Apps Script → Executions).
Common questions
What if I edit the same row twice? Each run is deduplicated using the spreadsheet ID, sheet name, row number, and edit timestamp. Re-triggering the same row within the same second won't produce a duplicate. To regenerate, clear the trigger column value and set it again.
What if generation fails? An error message is written to the output column so you can see it directly in the sheet without having to check Automette.
What if I edit other columns? The script sends every edit to Automette, but only rows where the trigger column matches the trigger value generate a document. All other edits are ignored server-side.
What if my Google account connection expires? The Apps Script bridge continues to fire — it uses a pre-shared secret, not your OAuth token. But write-back (the step that puts the PDF URL back in the sheet) requires an active connection. Reconnect your Google account in Automette settings if write-back stops working.
Can I pause the automation? Yes — pause it in Automette and the server-side check will skip all incoming events. The Apps Script can stay installed.
Last updated on