/** * Google Sheets Node - Version 4.1 * Discriminator: resource=sheet, operation=read */ interface Credentials { googleApi: CredentialReference; googleSheetsOAuth2Api: CredentialReference; } /** Retrieve one or more rows from a sheet */ export type GoogleSheetsV41SheetReadParams = { resource: 'sheet'; operation: 'read'; authentication?: 'serviceAccount' | 'oAuth2' | Expression; /** * Document * @builderHint Default to mode: 'list' which is easier for users to set up * @default {"mode":"list","value":""} */ documentId?: { __rl: true; mode: 'list' | 'url' | 'id'; value: string; cachedResultName?: string }; /** * Sheet * @builderHint Default to mode: 'list' which is easier for users to set up * @default {"mode":"list","value":""} */ sheetName?: { __rl: true; mode: 'list' | 'url' | 'id' | 'name'; value: string; cachedResultName?: string }; /** * Filters * @displayOptions.hide { sheetName: [""] } * @default {} */ filtersUI?: { /** Filter */ values?: Array<{ /** Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a> */ lookupColumn?: string | Expression; /** Value * @hint The column must have this value to be matched */ lookupValue?: string | Expression | PlaceholderValue; }>; }; /** * How to combine the conditions defined in "Filters": AND requires all conditions to be true, OR requires at least one condition to be true * @displayOptions.hide { sheetName: [""] } * @default OR */ combineFilters?: 'AND' | 'OR' | Expression; /** * Options * @displayOptions.hide { sheetName: [""] } * @default {} */ options?: { /** Data Location on Sheet * @default {"values":{"rangeDefinition":"detectAutomatically"}} */ dataLocationOnSheet?: { /** Values */ values?: { /** Range Definition */ rangeDefinition?: 'detectAutomatically' | 'specifyRangeA1' | 'specifyRange' | Expression; /** Read Rows Until * @displayOptions.show { rangeDefinition: ["detectAutomatically"] } * @default lastRowInSheet */ readRowsUntil?: 'firstEmptyRow' | 'lastRowInSheet' | Expression; /** Index is relative to the set 'Range', first row index is 1 * @hint Index of the row which contains the column names * @displayOptions.show { rangeDefinition: ["specifyRange"] } * @default 1 */ headerRow?: number | Expression; /** Index is relative to the set 'Range', first row index is 1 * @hint Index of first row which contains the actual data * @displayOptions.show { rangeDefinition: ["specifyRange"] } * @default 2 */ firstDataRow?: number | Expression; /** The table range to read from or to append data to. See the Google <a href="https://developers.google.com/sheets/api/guides/values#writing">documentation</a> for the details. * @hint You can specify both the rows and the columns, e.g. C4:E7 * @displayOptions.show { rangeDefinition: ["specifyRangeA1"] } */ range?: string | Expression | PlaceholderValue; }; }; /** Output Formatting * @default {"values":{"general":"UNFORMATTED_VALUE","date":"FORMATTED_STRING"}} */ outputFormatting?: { /** Values */ values?: { /** Determines how values should be rendered in the output */ general?: 'UNFORMATTED_VALUE' | 'FORMATTED_VALUE' | 'FORMULA' | Expression; /** Date Formatting */ date?: 'FORMATTED_STRING' | 'SERIAL_NUMBER' | Expression; }; }; /** Whether to select the first row of the sheet or the first matching row (if filters are set) * @default false */ returnFirstMatch?: boolean | Expression; /** By default only the first result gets returned, Set to "Return All Matches" to get multiple matches * @default returnFirstMatch */ returnAllMatches?: 'returnFirstMatch' | 'returnAllMatches' | Expression; }; }; export type GoogleSheetsV41SheetReadNode = { type: 'n8n-nodes-base.googleSheets'; version: 4.1; credentials?: Credentials; config: NodeConfig; };