I have setup a Webhook HTTP Connector and an Event Trigger in Orchestrator that will run my desired process on event that the Connection of the Connector is received. I have also set up a Google Sheet Apps Script which will trigger the webhook whenever the value in a column is set to ‘Ready’ and includes below data in the payload..
Everything works well and the process is triggered and runs well. However, now I want to pass the sheetName and spreadsheetId that is in my payload to my process. How can I do this?
// Prepare webhook payload: all data of the edited row
const lastColumn = sheet.getLastColumn();
const rowData = sheet.getRange(editedRow, 1, 1, lastColumn).getValues()[0];
const payload = {};
headers.forEach(function(header, idx) {
payload[header] = rowData[idx];
});
payload[‘trigger’] = ‘statusReady’;
payload[‘rowNumber’] = editedRow;
payload[‘sheetName’] = sheet.getName();
payload[‘spreadsheetId’] = sheet.getParent().getId();
const options = {
‘method’: ‘post’,
‘contentType’: ‘application/json’,
‘payload’: JSON.stringify(payload)
};
