Add row to spreadsheet
The Add row to spreadsheet action adds a single row of data to a Google Sheets spreadsheet.
On this page
Connection
To begin using Sheets actions, you must first connect Flow to your Google Sheets account. This user must have edit access to the spreadsheet.
If you aren't sure which user connected the Sheets action, then you can find the details of your connection in the Flow editor.
Fields
The Add row to spreadsheet action contains the following fields.
Field | Description |
---|---|
Spreadsheet URL | Required. Enter spreadsheet's URL that is displayed in the browser. |
Tab name | Required. Enter an existing tab name in the spreadsheet. |
Row contents (comma separated) | Required. Enter a comma separated list of fields. Each comma denotes a new column. |
Triggers
The Add row to spreadsheet action can be used with any trigger.
API reference
Flow calls the Google Sheets API to add a row to a spreadsheet. To learn more, review the Google Sheets API.
Frequently Asked Questions
The data from Flow spans across multiple columns. Why is this happening?
Columns in Sheets are separated by commas. If the data from Flow could potentially include a comma, then the data will be split into multiple columns. To avoid this, use a liquid filter to remove commas. For example, use {{ order.note | replace:",", " " }}
to replace commas with a space.
The data from Flow starts at the wrong column.
If your worksheet has empty values in the first few columns of the last row, then Sheets will insert the next column starting at the first column with content (docs). You can only fix this error by fixing your worksheet and by avoid entering blank values in spreadsheet.
I want to add a row for each line item in an order.
You can use Flow's For each action to loop through each line item and call the Add row to spreadsheet action for each of the line items.
I get a 403 error when I try to add a row to a spreadsheet. What does this mean?
Commonly, this means that the worksheet isn't accessible to the user that connected Google Sheets to Flow. To double-check this, review which user connected the Sheets action. Make sure that user can edit the worksheet from the share interface in Sheets.
If you get this error after making a new connection, you likely failed to give permission for Flow to edit your worksheets on this screen:
The checkbox See, edit, create, and delete all your Google Sheets spreadsheets
must be checked.
I get a 429 or 500 error when I try to add a row to a spreadsheet. What does this mean?
Commonly, this means that the worksheet is having trouble adding new rows. This can happen when the Google API receives too many requests or the worksheet has too many fields or rows.
How do I reconnect to Sheets?
Flow connections follow a similar process for reconnecting.