The ID of the spreadsheet to retrieve data from (found in the URL at docs.google.com/spreadsheets/d/{id})
Specify a sheet within your spreadsheet, like "Sheet1", or a range of values, like "Sheet1!A1:B2"
async
(params, auths) => {
}
// See https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get
// for details on the API docs.
const config = {
url: `https://sheets.googleapis.com/v4/spreadsheets/${params.spreadsheetId}/values/${params.sheet_name}`,
params: {
dateTimeRenderOption: params.dateTimeRenderOption,
majorDimension: params.majorDimension,
valueRenderOption: params.valueRenderOption,
},
headers: {
Authorization: `Bearer ${auths.google_sheets.oauth_access_token}`,
},
}
return await require("@pipedreamhq/platform").axios(this, config)
auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps) => {
}
return await $respond({
immediate: true,
status: 200,
body: {
rows: steps.get_values_from_sheet.$return_value.values.length,
values: steps.get_values_from_sheet.$return_value.values
}
})