How to trigger a script in Google Spreadsheet with .NET?

How can I automatically run a Google Script Function when my Spreadsheet is edited?

  • I have a script that I would like to automatically run when my spredsheed has been edited. I've seen onEdit function, but I don't understand how to use it to run my script. In my spreadsheet new rows are added by an IFTTT Recipe, then I would like to run my function when this type of change is verified.

  • Answer:

    The onEdit() trigger is the way to go. Here's a simple example pulled straight from the documentation: function onEdit(event) {   var ss = event.source.getActiveSheet();   var r = event.source.getActiveRange();   r.setComment("Last modified: " + (new Date())); } Inside the body of the function you can do a variety of things. If you need access to authorized services (such as Gmail, Calendar, etc) then you'll need to create an installable trigger instead. https://developers.google.com/apps-script/understanding_triggers

Eric Koleda at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.