Reputation: 25
I want to use a certain Google Spreadsheet as UI for a Cloud Function. For Example, I want the columns "SQLStatement", "TargetSheet" and "TargetCell" such that my colleagues can handle a GCFunction only with their SQL skills and write the results into the Google Sheets of their desire.
The script that reads the statements and writes the results is working, my problem is the trigger. The Cloud Function shall be triggered by every update of the source spreadsheet, I do not need any information to be pushed to the function.
I am doing research since a couple of days, but the more I read about Firestore, Appscript and Cloud Function Triggers the more confused I am and the farer I get from my original problem. Hence, my question is:
What is the easiest way to trigger a cloud function by an update of a certain Google Spreadsheet?
Thank you in advance!
Upvotes: 0
Views: 1007
Reputation: 598817
There is no built-in trigger type to run a Cloud Function upon a change in Google Sheets.
If you want to invoke a Cloud Function upon such a condition, you will have to write the Apps Script code to respond to an onEdit
event, detect the condition in that code, and then call your Cloud Function (typically a HTTP based one as shown here).
Upvotes: 2