Hi Guys,
Just following the below link to capture alerts via Webhooks and put into a Google Sheet.
https://developer.cisco.com/meraki/build/meraki-dashboard-alerts-with-google-sheets/
Completed all the steps, however getting the below error when testing sending an alert to the script:
TypeError: Cannot read property 'postData' of undefined at do Post(Code:120:33)
I've tried to solve myself, put a little lost. Triple checked code is exact copy to the one supplied by Meraki in tutorial.
Has there been a change to the API v0 vs V1 that might have broken this tutorial? Any help would be greatly appreciated.
Cheers
CS
// Webhook GET request. Simply verifies that server is reachable.
function doGet(e) {
return HtmlService.createHtmlOutput("Meraki Webhook Google Sheets");
}
// Webhook Receiver - triggered with post to pusblished App URL.
function doPost(e) {
var params = JSON.stringify(e.postData.contents);
params = JSON.parse(params);
var postData = JSON.parse(params);
display(postData);
// HTTP Response
return HtmlService.createHtmlOutput("post request received");
}