spreadsheet | string | Yes | - | Google Spreadsheet URL or ID, you must ask the user for it if not provided. |
sheet | string or SelectItem | Yes | - | The sheet to write data to. You can provide this in several ways: 1. If user provides just a sheet name, fill the object like this {‘label’: ‘Sheet1’, ‘value’: ‘Sheet1’} 2. If user provides only a sheet ID: Format as {‘label’: ‘123456’, ‘value’: ‘123456’} 3. If user provides dynamic values: Use the template syntax (e.g., ‘{{nodeId_data_sheet}}’) 4. If user selects from dropdown: they will ge this format {‘label’: ‘Sheet1’, ‘value’: ‘123456’} If user doesn’t provide sheet information, ask them to specify the sheet name or select from available sheets using the dropdown menu. |
write_mode | string or SelectableOption | Yes | - | Choose how to write the data to the sheet. Available options: ‘append’ - Add data to the end of the sheet after existing data, ‘overwrite’ - Replace data starting from a specific row, ‘clear’ - Remove all existing data before writing new data |
write_type | string or SelectableOption | Yes | - | Choose how to map your data into the sheet. Available options: ‘all’ - Write all data from previous steps to the sheet. Recommended for most cases, just provide data and everything is taken care of automatically. ‘mapped’ - Map data to specific columns manually. |
starting_row | integer | No | 1 | Enter the row number where data should start being written (e.g., 2), this is useful when you want to write data below existing headers or data. Default is 1. |
add_headers | boolean | No | True | Whether to write a header row above the data. Only applicable when write_type is ‘all’. - List of objects: the object keys are written as the first row and each object becomes a row (true, the default), or only the values are written (false). - List of lists or of plain values: there are no keys, so the rows are written exactly as given, first row included; put the header row first in the data yourself. This setting has no effect for that shape. |
auto_format_data | boolean | No | True | Enable to render formulas and automatically allows Google Sheets to format numbers, dates, and percentages. Disable to write data as RAW text. |
data | array (also accepts a comma-separated string) | No | - | Select the data to write to the sheet. You can provide a list of objects, list of lists or any data type. Recommended to use a list of objects for best results so you can use headers. A list of lists is written exactly as given, first row included, so put the header row first yourself. REQUIRED when write_type is ‘all’. MUST BE NULL/EMPTY when write_type is ‘mapped’ - clear this field if write_type changes to ‘mapped’. This field and column_mapping are mutually exclusive - only one should be used at a time. For workflows, this will be mainly the output of an upstream node. Example: ‘{{nodeId__data}}‘ |
column_mapping | ColumnMapping | No | - | Map source data fields to target columns. Column should be in the format of A, B, C, etc. REQUIRED when write_type is ‘mapped’. MUST BE NULL/EMPTY when write_type is ‘all’ - clear this field if write_type changes to ‘all’. This field and data are mutually exclusive - only one should be used at a time. For workflows, this will be mainly the output of an upstream node. Examples: {‘A’: ‘{{nodeId__data.cost}}’, ‘B’: [‘{{nodeId__data.date}}’]} |