Google Sheets
The Google Sheets steps connect your workflows to your spreadsheets:
- Google Sheets trigger starts a workflow when a row is added or changed.
- Google Sheets - Write row adds a new row or updates an existing one.
- Google Sheets - Find rows reads the rows that match your conditions.
Use them to generate a document for every new row, keep a log of every generated document, update a status column, or pull data from a sheet into your documents.
Example
An operations manager tracks client orders in a sheet with an Order ID and a Status column. When an order form is submitted, the workflow:
- Generates an order confirmation with a Document step.
- Uses a Google Sheets - Write row step to update the Status column in the sheet.
Connect your account
- Add a Google Sheets step and click Sign in under Account.
- Sign in with Google and allow access.
- Back in the workflow editor, the Manage Google Access window opens. Click Add spreadsheets and pick the spreadsheets TemplateDocs may use.
TemplateDocs can only use the spreadsheets you approve. Approved spreadsheets are available to all workflows in your organization. To approve another spreadsheet later, click Add next to the Spreadsheet setting. Only the person who connected the Google account can add spreadsheets.
Only organization owners and admins can add or reconnect accounts. You can manage all connected accounts in your Organization Settings.
Trigger
The Google Sheets trigger starts a workflow when a row of a sheet is added or changed.
Settings
| Setting | Description |
|---|---|
| Account, Spreadsheet and Sheet | The sheet to listen to. |
| Table contains header | Turn this on if the first row holds column names. The header row never starts the workflow. |
| Column types | How each column is read (see Write row). |
| Start when | One of:
|
| Rows must match (optional) | Conditions the row must match to start a run, for example a Status of Done. Without conditions, every added or changed row starts a run. |
| Include new rows (for Row changed) | A new row also starts a run when it is created and matches the conditions. If you chose a Column, the column must be filled. |
The trigger only listens while the workflow is published. Each new or changed row starts one run with the row's latest values. To try the workflow before publishing, click Test in the workflow editor and pick a row.
When runs start
The trigger checks the sheet after a few minutes of inactivity.
Trigger best practices
- Changing your sheet's structure after publishing the workflow can cause unexpected behavior.
- For best results, add new rows at the bottom of the sheet.
- If a row takes longer to complete, use Row changed with a Column that is filled last to avoid triggering runs on incomplete rows.
Output variables
- Row - The row: its Row Number and one value per column.
- Event Type -
RowAddedorRowChanged. A new row that starts a Row changed trigger readsRowAdded. - Event Time - When the row was found.
- Spreadsheet Name / Spreadsheet URL - The spreadsheet of the row.
- Sheet Name - The sheet (tab) of the row.
Write row
Settings
| Setting | Description |
|---|---|
| Account, Spreadsheet and Sheet | Where to write. |
| Action | Append row adds a new row at the bottom of the sheet. Update row changes an existing row. |
| Row values | The cell values, in column order. Type @ to insert variables or formulas. Date columns also let you pick a date or a date relative to today. |
| Table contains header | Turn this on if the first row holds column names. The values are then labeled by column name. Without a header, click Add column to add values for columns A, B, C and so on. |
Updating a row
With Update row, you also set:
| Setting | Description |
|---|---|
| Row to update | Conditions that find the row, for example "Invoice Number is Invoice Number". Exactly one row must match. If more than one row matches, the step fails. |
| If no row matches | Fail the step, Append the row, or Skip the step. An appended row also gets the values from your is conditions, unless you set those cells yourself. |
| Column types | How each column is read when matching (Text, Number, Checkbox, Date or Date and time). Types are detected from the sheet. Change one only if it was detected wrongly. |
Only cells with a value are updated. Empty values leave the existing cells unchanged.
Output variables
- Spreadsheet ID / Spreadsheet URL - The spreadsheet that was written to.
- Sheet Name - The sheet (tab) that was written to.
- Updated Range - The cells that were written, such as
Sheet1!A12:E12. - Updated Rows - The number of rows written (0 when skipped).
- Operation -
Appended,UpdatedorSkipped.
Example: append the client's name, email and agreement status to a spreadsheet.

Find rows
Settings
| Setting | Description |
|---|---|
| Account, Spreadsheet and Sheet | Where to search. |
| Table contains header | Turn this on if the first row holds column names. The header row is then not returned as data. |
| Column types | How each column is read (see above). |
| Conditions | Click Add condition and choose a column, a comparison (such as is, contains, is empty or is after) and a value. Choose All conditions or Any condition. With no conditions, every row is returned. |
| Sorting | Click Add sort to order the rows by one or more columns. |
| Maximum rows | Up to 1,000 rows. The default is 100. |
| When more rows match | Fail the step or Return the first matching rows. |
If no rows match, the step still succeeds and returns an empty list. The step can read sheets with up to 50,000 rows.
Output variables
- Rows - The matching rows. Each row has a Row Number and one value per column.
- Row Count - The number of rows returned.
- Has More -
trueif more rows matched than the maximum. - Spreadsheet ID / Spreadsheet URL - The spreadsheet that was searched.
- Sheet Name - The sheet (tab) that was searched.
Map Rows to a template loop to turn spreadsheet data into a table in your document.
Credits
The Google Sheets trigger is free (0 credits). Each Google Sheets action step that runs (Write row or Find rows) costs 1 credit. See Credits.
Related
- Workflow overview - how triggers and steps fit together
- Document Step - generate DOCX or PDF files from workflow data
- Formulas - calculate and transform values before mapping them
- Template loops - turn the records this step returns into tables and lists