category: Utilities provider: Google commonfields: id: GoogleSheets version: -1 sectionorder: - Connect - Collect configuration: - name: service_account_credentials display: required: true defaultvalue: type: 9 additionalinfo: A service account key from Google. displaypassword: Service Account Key hiddenusername: true section: Connect - name: insecure display: Trust any certificate (not secure) type: 8 additionalinfo: required: false section: Connect advanced: true - name: proxy display: Use system proxy settings type: 8 additionalinfo: required: false section: Connect advanced: true - name: user_id display: Email - Associate to Google Drive defaultvalue: type: 0 additionalinfo: > Used to impersonate a Google workspace user, so the spreadsheets is created in the associated Google Drive and is easily accessible from a UI. This parameter is used during the authentication process. required: false section: Connect description: Google Sheets is a spreadsheet program that is part of the free web-based Google applications to create and format spreadsheets. Use this integration to create and modify spreadsheets. display: Google Sheets name: GoogleSheets script: commands: - arguments: - description: The title of the spreadsheet to create. name: title required: true - default: true defaultValue: en description: The locale of the spreadsheet to create. name: locale - auto: PREDEFINED defaultValue: TEXT description: The type of the cell format of the spreadsheet to create. name: cell_format_type predefined: - NUMBER - TEXT - PERCENT - CURRENCY - DATE - TIME - DATE_TIME - SCIENTIFIC - name: cell_format_backgroundColor description: "A comma-separated list of background colors in the following order - red,green,blue,alpha. All values must be between 0-1. If chosen, you must specify all fields." isArray: true defaultValue: "" - defaultValue: "11" description: Cell font size in the spreadsheet to create. name: cell_format_textformat_font_size - auto: PREDEFINED defaultValue: LEFT_TO_RIGHT description: Cell text direction in the spreadsheet to create. name: cell_format_textformat_text_direction predefined: - LEFT_TO_RIGHT - RIGHT_TO_LEFT - description: Sets the title of the first sheet in the spreadsheet to create. name: sheet_title required: true - auto: PREDEFINED defaultValue: GRID description: Sets the type of the first sheet in the spreadsheet to create. name: sheet_type predefined: - GRID - OBJECT - DATASOURCE description: Create a new spreadsheet. name: google-sheets-spreadsheet-create outputs: - contextPath: GoogleSheets.Spreadsheet.properties.title description: Spreadsheet title. type: Unknown - contextPath: GoogleSheets.Spreadsheet.spreadsheetId description: Spreadsheet ID. type: Unknown - arguments: - name: spreadsheet_id description: ID of the spreadsheet to get. required: true isArray: true defaultValue: "" - default: true defaultValue: "false" auto: PREDEFINED predefined: - "true" - "false" description: True if grid data should be returned. This parameter is ignored if a field mask was set in the request. name: include_grid_data - description: Works only with include_grid_data = True. The ranges to retrieve from the spreadsheet. Ranges are specified using A1 notation. For example, Sheet1!A1:D5. For further explanation and examples, see https://developers.google.com/sheets/api/guides/concepts#expandable-1. isArray: true name: ranges description: Returns the spreadsheet of the given ID. If include_grid_data is set to true and no ranges given, will defaultly return the first 500 rows and 20 columns of the first sheet. name: google-sheets-spreadsheet-get outputs: - contextPath: GoogleSheets.Spreadsheet.spreadsheetTitle description: Spreadsheet title. type: Unknown - contextPath: GoogleSheets.Spreadsheet.spreadsheetId description: SpreadSheet ID. type: Unknown - contextPath: GoogleSheets.Spreadsheet.spreadsheetUrl description: Spreadsheet URL. type: Unknown - contextPath: GoogleSheets.Spreadsheet.sheets.title description: Sheet title. type: Unknown - contextPath: GoogleSheets.Spreadsheet.sheets.index description: Sheet index. type: Unknown - contextPath: GoogleSheets.Spreadsheet.sheets.sheetId description: Sheet ID. type: Unknown - contextPath: GoogleSheets.Spreadsheet.sheets.gridProperties description: Sheet grid properties. type: Unknown - contextPath: GoogleSheets.Spreadsheet.sheets.rowData description: Sheet row data (only when the `include_grid_data` is set to true). type: Unknown - arguments: - description: Spreadsheet ID in which to create a new sheet. name: spreadsheet_id required: true - name: echo_spreadsheet description: Include the spreadsheet in the response. defaultValue: "false" auto: PREDEFINED predefined: - "true" - "false" - description: Sheet title to create. name: sheet_title required: true - description: The index of the sheet within the spreadsheet. name: sheet_index - auto: PREDEFINED default: true defaultValue: GRID description: Sheet type to create. name: sheet_type predefined: - GRID - OBJECT - DATA_SOURCE - description: True if the sheet is a right_to_left sheet instead of a left_to_right sheet. name: right_to_left auto: PREDEFINED predefined: - "false" - "true" - name: tab_color description: A comma-separated list of the color of the tab in the UI in the following order - red,green,blue,alpha. All values must be between 0-1. If chosen, you must specify all fields. isArray: true defaultValue: "" - description: True if the sheet is hidden in the UI. False if it is visible. name: hidden - name: sheet_id description: The ID of the sheet to create. (Needs to be unique. If not specified, the sheet ID will be generated by Google Sheets. description: Adds a new sheet. When a sheet is added at a given index, all subsequent sheet indexes are incremented. name: google-sheets-sheet-create outputs: - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.properties.title description: Spreadsheet title. type: Unknown - contextPath: GoogleSheets.Spreadsheet.spreadsheetId description: Spreadsheet ID. type: Unknown - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.spreadsheetUrl description: Spreadsheet URL. type: Unknown - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.sheetId description: Sheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.title description: Sheet title. type: String - name: google-sheets-sheet-duplicate description: Duplicates the contents of a sheet. arguments: - name: spreadsheet_id description: Spreadsheet ID from which to copy a sheet. required: true defaultValue: "" - name: echo_spreadsheet description: True to add the spreadsheet to the output. defaultValue: "false" auto: PREDEFINED predefined: - "true" - "false" - name: source_sheet_id description: The ID of the sheet to copy. required: true defaultValue: "" - name: new_sheet_index description: If set, the ID of the new sheet. If not set, an ID is chosen. If set, the ID must not conflict with any existing sheet ID and it must be non-negative number. defaultValue: "" - name: new_sheet_name description: The name of the new sheet. required: true defaultValue: "" outputs: - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.properties.title description: Spreadsheet title. type: String - contextPath: GoogleSheets.Spreadsheet.spreadsheetId description: Spreadsheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.spreadsheetUrl description: Spreadsheet URL. type: Unknown - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.sheetId description: Sheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.title description: Sheet title. type: String - name: google-sheets-sheet-copy-to description: Copies a single sheet from a spreadsheet to another spreadsheet. arguments: - name: source_spreadsheet_id description: Spreadsheet ID to copy from. required: true defaultValue: "" - name: source_sheet_id description: The ID of the sheet to copy. required: true defaultValue: "" - name: destination_spreadsheet_id description: The ID of the spreadsheet to copy the sheet to. required: true defaultValue: "" outputs: [] - name: google-sheets-sheet-delete description: Delete a sheet from a spreadsheet by ID. arguments: - name: spreadsheet_id description: Spreadsheet from which to delete sheet. required: true defaultValue: "" - name: echo_spreadsheet description: True to add the spreadsheet to the output. defaultValue: "false" auto: PREDEFINED predefined: - "true" - "false" - name: sheet_id description: ID of sheet to delete. required: true defaultValue: "" outputs: - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.properties.title description: Spreadsheet title. type: String - contextPath: GoogleSheets.Spreadsheet.spreadsheetId description: Spreadsheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.spreadsheetUrl description: Spreadsheet URL. type: Unknown - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.sheetId description: Sheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.title description: Sheet title. type: String - name: google-sheets-sheet-clear description: Clears values from a spreadsheet. The caller must specify the spreadsheet ID and range. Only values are cleared. All other properties of the cell (such as formatting, data validation, etc..) are kept. arguments: - name: spreadsheet_id description: Spreadsheet ID to update. required: true defaultValue: "" - name: range description: A1 notation or R1C1 notation of the values to clear. A1 notation example, Sheet1!A1:D5. For further explanation and examples, see https://developers.google.com/sheets/api/guides/concepts#expandable-1. required: true defaultValue: "" outputs: - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.properties.title description: Spreadsheet title. type: String - contextPath: GoogleSheets.Spreadsheet.spreadsheetId description: Spreadsheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.spreadsheetUrl description: Spreadsheet URL. type: Unknown - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.sheetId description: Sheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.title description: Sheet title. type: String - name: google-sheets-range-delete description: Deletes a range of cells, shifting other cells into the deleted area. arguments: - name: spreadsheet_id description: Spreadsheet ID. required: true defaultValue: "" - name: echo_spreadsheet description: True to add the spreadsheet to the output. defaultValue: "false" auto: PREDEFINED predefined: - "true" - "false" - name: sheet_id description: The sheet this range is in. required: true defaultValue: "" - name: start_row_index description: The start row (inclusive) of the range, or not set if unbounded. required: true defaultValue: "" - name: end_row_index description: The end row (exclusive) of the range, or not set if unbounded. required: true defaultValue: "" - name: start_column_index description: The start column (inclusive) of the range, or not set if unbounded. required: true defaultValue: "" - name: end_column_index description: The end column (exclusive) of the range, or not set if unbounded. required: true defaultValue: "" - name: shift_dimension description: The dimension from which deleted cells will be replaced with. If ROWS, existing cells will be shifted upward to replace the deleted cells. If COLUMNS, existing cells will be shifted left to replace the deleted cells. required: true defaultValue: "" auto: PREDEFINED predefined: - ROWS - COLUMNS outputs: - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.properties.title description: Spreadsheet title. type: String - contextPath: GoogleSheets.Spreadsheet.spreadsheetId description: Spreadsheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.spreadsheetUrl description: Spreadsheet URL. type: Unknown - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.sheetId description: Sheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.title description: Sheet title. type: String - name: google-sheets-dimension-delete description: Deletes the dimensions from the sheet. Note that the indexing starts from 0. arguments: - name: spreadsheet_id description: Spreadsheet ID. required: true defaultValue: "" - name: echo_spreadsheet description: True to add the spreadsheet to the output. defaultValue: "false" auto: PREDEFINED predefined: - "true" - "false" - name: dimension_type description: The dimension of the span. required: true defaultValue: "" auto: PREDEFINED predefined: - ROWS - COLUMNS - name: sheet_id description: The sheet this span is in. required: true defaultValue: "" - name: start_index description: The start (inclusive) of the span, or not set if unbounded. required: true defaultValue: "" - name: end_index description: The end (exclusive) of the span, or not set if unbounded. required: true defaultValue: "" outputs: - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.properties.title description: Spreadsheet title. type: String - contextPath: GoogleSheets.Spreadsheet.spreadsheetId description: Spreadsheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.spreadsheetUrl description: Spreadsheet URL. type: Unknown - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.sheetId description: Sheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.title description: Sheet title. type: String - name: google-sheets-data-paste description: Inserts data into the spreadsheet starting at the specified coordinate. arguments: - name: spreadsheet_id description: Spreadsheet ID. required: true defaultValue: "" - name: echo_spreadsheet description: True to add the spreadsheet to the output. defaultValue: "false" auto: PREDEFINED predefined: - "true" - "false" - name: sheet_id description: The sheet this coordinate is in. required: true defaultValue: "" - name: row_index description: The row index of the coordinate. required: true defaultValue: "" - name: column_index description: The column index of the coordinate. required: true defaultValue: "" - name: data description: The data to insert. If data_kind is delimiter, the delimiter will be ',' and the data should be in the following format cell1, cell2, cell3... If data_kind is html, enter a single value. required: true defaultValue: "" - name: data_kind description: How to interpret the data inserted in data argument. required: true defaultValue: "" auto: PREDEFINED predefined: - delimiter - html - name: paste_type description: The way the data should be pasted. defaultValue: NORMAL auto: PREDEFINED predefined: - NORMAL - VALUES - FORMAT - NO_BORDERS - FORMULA - DATA_VALIDATION - CONDITIONAL_FORMATTING outputs: - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.properties.title description: Spreadsheet title. type: String - contextPath: GoogleSheets.Spreadsheet.spreadsheetId description: Spreadsheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.spreadsheetUrl description: Spreadsheet URL. type: Unknown - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.sheetId description: Sheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.title description: Sheet title. type: String - name: google-sheets-find-replace description: Finds and replaces data in cells over a range, sheet, or all sheets. arguments: - name: spreadsheet_id description: Spreadsheet ID. required: true defaultValue: "" - name: echo_spreadsheet description: True to add the spreadsheet to the output. defaultValue: "false" auto: PREDEFINED predefined: - "true" - "false" - name: find description: The value to find. required: true defaultValue: "" - name: replacement description: The value to use as the replacement. required: true defaultValue: "" - name: sheet_id description: The sheet to find/replace. defaultValue: "" - name: all_sheets description: True to find/replace over all sheets. defaultValue: "" auto: PREDEFINED predefined: - "True" - "False" - name: match_case description: True if the search is case sensitive. defaultValue: "" auto: PREDEFINED predefined: - "True" - "False" - name: match_entire_cell description: True if the find value should match the entire cell. defaultValue: "" auto: PREDEFINED predefined: - "True" - "False" - name: range_sheet_id description: The sheet this range is on. defaultValue: "" - name: range_start_row_Index description: The start row (inclusive) of the range, or not set if unbounded. defaultValue: "" - name: range_end_row_Index description: The end row (exclusive) of the range, or not set if unbounded. defaultValue: "" - name: range_start_column_Index description: The start column (inclusive) of the range, or not set if unbounded. defaultValue: "" - name: range_end_column_Index description: The end column (exclusive) of the range, or not set if unbounded. defaultValue: "" outputs: - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.properties.title description: Spreadsheet title. type: String - contextPath: GoogleSheets.Spreadsheet.spreadsheetId description: Spreadsheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.spreadsheetUrl description: Spreadsheet URL. type: Unknown - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.sheetId description: Sheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.title description: Sheet title. type: String - name: google-sheets-value-update description: Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption. arguments: - name: spreadsheet_id description: Spreadsheet ID. required: true defaultValue: "" - name: range description: The A1 notation of the values to update. For example, Sheet1!A1:D5. For further explanation and examples, see https://developers.google.com/sheets/api/guides/concepts#expandable-1. required: true defaultValue: "" - name: input_option description: Determines how input data should be interpreted. required: true defaultValue: "" auto: PREDEFINED predefined: - RAW - USER_ENTERED - name: major_dimension description: The major dimension of the values. required: true auto: PREDEFINED predefined: - ROWS - COLUMNS - name: values description: The data that was read or to be written. This is an array of arrays. The outer array representing all the data and each inner array representing a major dimension. Each item in the inner array corresponds to one cell. To be entered in the following format - [1,2,3],[4,5,6] where each bracket will be the row or column, and each value inside will correspond to a cell. required: true defaultValue: "" outputs: [] - name: google-sheets-value-append description: Appends values to a spreadsheet. The input range is used to search for existing data and find a "table" within that range. Values will be appended to the next row of the table, starting with the first column of the table. See the guide (https://developers.google.com/sheets/api/guides/values#appending_values) and sample code (https://developers.google.com/sheets/api/samples/writing#append_values) for specific details of how tables are detected and data is appended. The caller must specify the spreadsheet ID, range, and a valueInputOption. The valueInputOption only controls how the input data will be added to the sheet (column-wise or row-wise), it does not influence what cell the data starts being written to. arguments: - name: spreadsheet_id description: Spreadsheet ID. required: true defaultValue: "" - name: range description: The A1 notation of a range to search for a logical table of data. Values are appended after the last row of the table. A1 notation example, Sheet1!A1:D5 For further explanation and examples, see https://developers.google.com/sheets/api/guides/concepts#expandable-1 required: true defaultValue: "" - name: input_option description: The way input data should be interpreted. defaultValue: "" auto: PREDEFINED predefined: - RAW - USER_ENTERED - name: insert_option description: The way input data should be inserted. required: true defaultValue: "" auto: PREDEFINED predefined: - OVERWRITE - INSERT_ROWS - name: major_dimension description: The major dimension of the values. required: true defaultValue: "" auto: PREDEFINED predefined: - ROWS - COLUMNS - name: values description: The data that was read or to be written. This is an array of arrays. The outer array representing all the data and each inner array representing a major dimension. Each item in the inner array corresponds to one cell. To be entered in the following format - [1,2,3],[4,5,6] where each bracket will be the row or column, and each value inside will correspond to a cell. required: true defaultValue: "" outputs: [] - name: google-sheets-spreadsheet-update description: This is a custom update command, used to apply any of the Google Sheets API options. Applies one or more updates to the spreadsheet. Each request is validated before being applied. If any request is not valid, the entire request will fail and nothing will be applied. arguments: - name: spreadsheet_id description: Spreadsheet ID. required: true defaultValue: "" - name: echo_spreadsheet description: True to add the spreadsheet to the output. defaultValue: "False" auto: PREDEFINED predefined: - "False" - "True" - name: requests description: JSON input according to the method documentation and object documentation - for advanced users' free use (Google Sheets API) https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/batchUpdate required: true defaultValue: "" outputs: - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.properties.title description: Spreadsheet title. type: String - contextPath: GoogleSheets.Spreadsheet.spreadsheetId description: Spreadsheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.spreadsheetUrl description: Spreadsheet URL. type: Unknown - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.sheetId description: Sheet ID. type: String - contextPath: GoogleSheets.Spreadsheet.updatedSpreadsheet.sheets.title description: Sheet title. type: String dockerimage: demisto/googleapi-python3:1.0.0.10182333 runonce: false script: "-" subtype: python3 type: python tests: - GoogleSheets-Test fromversion: 6.1.0