Skip to main content

Insert Row

Inserts a row of data into a Google Spreadsheet.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Spreadsheet Id - The ID of the Google Spreadsheet where the row data will be inserted.
  • Start Cell - The cell reference (e.g., "A1", "B2") indicating where to start inserting the row data.
  • Row Data - An object containing key-value pairs representing column headers and their corresponding values.

Options

  • Append Last Row - If enabled, the row data will be appended to the end of the sheet instead of inserting at the specified Start Cell.
  • Headers - If enabled, the column headers from the first row of the sheet will be used to map the Row Data keys.

Output

No output variables for this node.

How It Works

The Insert Row node adds a row of data to a Google Spreadsheet. When executed, the node:

  1. Validates all input parameters
  2. Connects to the Google Spreadsheet using the provided ID
  3. Processes the row data based on the Headers option:
    • If Headers is enabled, maps the Row Data keys to column headers
    • If Headers is disabled, sorts the Row Data keys alphabetically
  4. Calculates the range for inserting the row data
  5. Prepares the row data in the required format
  6. Sends an append request to insert the row data
  7. Returns any errors encountered during the process

Requirements

  • A valid Google Spreadsheet ID
  • A valid cell reference in the format of a letter followed by a number (e.g., "A1", "B2") when not using Append Last Row
  • Valid row data as an object with key-value pairs
  • Proper Google Sheets API authentication and permissions

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid Spreadsheet Id
  • Empty or invalid Start Cell reference (when not using Append Last Row)
  • Empty or invalid Row Data
  • Invalid cell reference format
  • Google Sheets API authentication or permission errors
  • Network or connectivity issues with Google Sheets API

Usage Notes

  • The Spreadsheet Id can be obtained from the URL of your Google Spreadsheet
  • When using the Headers option, the first row of the sheet must contain column headers
  • When not using the Headers option, keys in the Row Data object are sorted alphabetically
  • The Append Last Row option ignores the Start Cell input and adds data to the end of the sheet
  • This operation modifies the spreadsheet data, so use with caution
  • Ensure your Google account has proper permissions to modify the target spreadsheet