Set Range
Sets a range of data in 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 data range will be set.
- Start Cell - The starting cell of the range to set (e.g., "A1").
- End Cell - The ending cell of the range to set (e.g., "Z100").
- Table - A structured table of data to be written to the spreadsheet range.
Options
- Headers - If enabled, the first row of the table will be treated as column headers.
- Set as Formula - If enabled, values in the table will be treated as formulas rather than plain text.
Output
No output variables for this node.
How It Works
The Set Range node writes a structured table of data to a specified range in a Google Spreadsheet. When executed, the node:
- Validates all input parameters
- Connects to the Google Spreadsheet using the provided ID
- Processes the table data based on the Headers option:
- If Headers is enabled, includes column headers as the first row
- If Headers is disabled, writes only the data rows
- Constructs a value range with the processed table data
- Determines the appropriate value input option based on the Set as Formula option
- Sends an update request to write the data to the specified range
- Returns any errors encountered during the process
Requirements
- A valid Google Spreadsheet ID
- Valid cell references for the range (Start Cell and End Cell)
- Valid table data in the required format
- 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 Table 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 or from the Open Spreadsheet node
- The Start Cell defaults to "A1" if not specified
- The End Cell is optional but recommended for better performance
- When Headers is enabled, the first row of the output will contain column names
- When Set as Formula is enabled, values will be treated as formulas (e.g., "=SUM(A1:A10)")
- When Set as Formula is disabled, values will be written as literal text or numbers
- This operation modifies the spreadsheet data, so use with caution
- Ensure your Google account has proper permissions to modify the target spreadsheet