In Google Sheets, you can deploy your script as a web app that generates a unique URL and paste the URL to the WealthBlock platform.
To initiate your script, you can follow the steps below:
- Open a new Google Sheets form
- Go to the Tools menu and select Script Editor
- Paste this script into the script code editor
//this is a function that fires when the webapp receives a GET request function doGet(e) { return HtmlService.createHtmlOutput('request received'); } //this is a function that fires when the webapp receives a POST request function doPost(e) { var post = JSON.parse(e.postData.contents); var vd = post; var sheet = SpreadsheetApp.getActiveSpreadsheet(); var lastRow = Math.max(sheet.getLastRow(),1); var lastcol=1; sheet.insertRowAfter(lastRow); sheet.getRange(lastRow + 1, lastcol++ ).setValue(vd.uid); sheet.getRange(lastRow + 1, lastcol++ ).setValue(vd.username); sheet.getRange(lastRow + 1, lastcol++ ).setValue(vd.profile.firstName); sheet.getRange(lastRow + 1, lastcol++ ).setValue(vd.profile.lastName); sheet.getRange(lastRow + 1, lastcol++ ).setValue(vd.profile.emailOptOut); sheet.getRange(lastRow + 1, lastcol++ ).setValue(vd.accountIds ? vd.accountIds[0] : ''); SpreadsheetApp.flush(); return HtmlService.createHtmlOutput('post request received'); }
- Click Save
- From the Publish menu, select Deploy as a Web App
- Select to execute the app as Me and allow Anyone, even anonymous to execute the script
- Click Deploy
- You will be asked to review permissions
- Click on Review Permissions and select your account
- Choose Advanced
- Click Go to the Webhooks
- Click Allow
- Copy the webhook URL
- Navigate to your WealthBlock platform
- Select Platform from the left menu
- Choose Settings
- Select Integrations
- Paste the webhook URL into the Post user profile updates to a Web Hook field
- Any updates to users will appear in your Google Sheet
- You can follow the example row below, and customize columns as needed
- You can follow the example row below, and customize columns as needed
REF: Do you have integration with Hubspot, Salesforce (or any other CRM or apps)?
#automation, integration, google script, google sheet, webhook, web hook
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article