3

I have code that calls an API from Salesforce to get data from a Google Spreadsheet.

This code runs every hour. Is it possible to hit a url from a Google Spreadsheet whenever the sheet is updated using a webhook or something?

1
  • 1
    Just what were about to do :) would you mind sharing the bit of spreadsheet code that would call the webhook? Commented Apr 7, 2016 at 16:11

1 Answer 1

4
+50

Have you considered Lightning Connect to use the Google sheet as an OData data source? Then you could keep the data in the Google sheet and just extract it as required. See Google Drive™ Custom Adapter for Lightning Connect

The alternative is to either call one of the existing Salesforce APIs, either REST or SOAP, to directly update the Salesforce data.

Or you could create a REST or SOAP based web method in Apex and call that as required.

If you create your own web service, calls into it could either receive the updated data and use it to update Salesforce, or simply call your existing code to extract the data from the Google Sheet.

In both cases, you would need to authenticate your calls. Otherwise you would need to make a public web service - Public RESTful Web Services on Force.com Sites

1
  • 2
    since security can (somewhat) be provided from google side, we're quickstarting with a public REST. Before trying the oauth dance, I need to further investigate the effects of single sign on etc Commented Apr 7, 2016 at 16:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .