Facebook Leads to Google Sheet using Webhooks - Hashgrow

You can now easily get real time leads into your google sheet using Hashgrow webhooks.

Please follow these easy steps to get started.

1. Open a new spreadsheet from http://sheets.google.com/.
2. Upload the code below in the script editor of the spreadsheet.
3. Publish the code to get the webapp URL.
4. Once deployed, copy the webapp URL which will be used later in our app configuration.
5. Open your Hashgrow mobile app and set the url under Integration -> Google Sheet with webhooks -> Configure -> Save.

Follow above steps with more detailed screenshot guide below.

  1. Steps in Browser -> Google Sheet


const ID = "<sheet-id-replace-here>";
const SHEET_NAME = "Sheet1";
function doPost(request)
  var spreadsheet = SpreadsheetApp.openById(ID);
  var sheet = spreadsheet.getSheetByName(SHEET_NAME);
  var leadData = JSON.parse(JSON.stringify(request));
  sheet.appendRow(["NEW LEAD:",leadData.parameter.form_id,leadData.parameter.phone_number]);
  return ContentService.createTextOutput(JSON.stringify(request));

2. Step in Mobile App – Add integration with above url to Hashgrow Mobile App