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 | Write column headers at the top of the data. This uses the keys from your data objects as headers when data type is List of Objects, and the first row of data when data type is List of Lists. Only applicable when write_type is ‘all’. |
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. 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}}’]} |