Tutorial error - Meraki Dashboard Alerts with Google Sheets

capt_stab
Comes here often

Tutorial error - Meraki Dashboard Alerts with Google Sheets

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");
}

 

Screen Shot 2022-02-23 at 10.35.05 am.png

 

 

 

 

1 REPLY 1
ShannonStronge
New here

Did you manage to find a solution? Also having issues

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.