function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mike1051mike1051 

Googlsheet update data real time in salesforce.?


i want to update data from google sheet to salesforce.I have called API from salesforce to get data from Google sheet to salesforce.
My code is working fine and i am able to get data from Google sheet.
Problem its running every 1 hour and i am getting the data. Is it possible i can hit any url from google sheet when ever the sheet is updated.? webhook or something.?
Daniel BallingerDaniel Ballinger
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 (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connector_example_google_drive.htm)

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. 
In both cases, you would need to authenticate your calls.