Join Scott Simpson for an in-depth discussion in this video Running your script automatically, part of Up and Running with Google Apps Script.
- Rather than just running a script…or calling functions manually,…Apps Script provides a way…to make things happen programmatically…through triggers which fire when particular events happen.…There are two types to be aware of, simple and installable.…Simple triggers are available in bound scripts…and let you tie execution of functions to events…like opening the document, editing the document and more.…These simple triggers can't use services…that require authorization, however.…
Installable triggers are available in bound scripts too…and can use services that require authorization.…Installable triggers can also be used to create…time-driven triggers to run your script automatically…anywhere from once a minute to once a month.…Keep in mind that the actual execution time…is slightly randomized by the system.…Let's take a look at using a time-driven trigger.…I'll clear out my spreadsheet…and I'll switch over to my IDE.…
Let's clear this out as well.…The first thing we'll need…is a function to run occasionally.…I'll just make a very basic function to add some text…
First, learn how to use simple scripts to edit documents and spreadsheets, work with files in Drive, and find and send messages in Gmail. Then find out how to add custom functionality to your spreadsheets, and build user interface elements for your scripts, using menus, alerts, and dialogs. Finally, Scott shows how to share your work with others by publishing scripts as web apps.
- What is Google Apps Script?
- Understanding script types
- Logging and debugging your scripts
- Scripting common tasks
- Building custom spreadsheet functions
- Creating add-on functionality such as dialogs and sidebars
- Sharing your script as a web app
Skill Level Beginner
Q: The OpenWeatherMap API is not working, or the call returns a 404. What do I do?
<div>A: OpenWeatherMap now requires you to use a free API key (or APPID) when requesting information. You'll need to register for a free key at <a target="_blank" href="http://home.openweathermap.org/users/sign_up">http://home.openweathermap.org/users/sign_up</a> and then add the APPID parameter and your key to the end of the request URL.</div><div> </div><div>So, your request string "api.openweathermap.org/data/2.5/weather?zip=94040,us" would become "api.openweathermap.org/data/2.5/weather?zip=94040,us&appid=abc123abc123" (using your APPID/API key).</div><div> </div>