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?
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?
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