Trigger Google Apps Script - learnit

Home Top Ad

Post Top Ad

Friday, December 17, 2021

Trigger Google Apps Script

Trigger Google Apps Script

Google Apps Script overview

Google Apps Script is a rapid application development platform that allows you to create business applications that integrate with Google Workspace quickly and easily. You write code in modern JavaScript and have access to built-in libraries for popular Google Workspace apps such as Gmail, Calendar, Drive, and others. There is no software to download; we provide a code editor right in your browser, and your scripts run on Google's servers.


Triiger Google Apps Script

Triggers allow Apps Script to run a function automatically when a specific event occurs, such as opening a document. Simple triggers are a collection of reserved functions built into Apps Script, such as the function onOpen(e), which is called when a user opens a Google Docs, Sheets, Slides, or Forms file. Installable triggers provide more functionality than simple triggers, but they must be activated before use. Apps Script passes an event object containing information about the context in which the event occurred to the triggered function for both types of triggers.


Getting started

To use a simple trigger, simply create a function that uses one of these reserved function names:

onOpen(e)When a user opens a spreadsheet, document, presentation, or form that he or she has permission to edit, the script runs.

onInstall(e) When a user installs an Editor add-on from within Google Docs, Sheets, Slides, or Forms, this script runs.

onEdit(e) runs when a user changes a value in a spreadsheet.

onSelectionChange(e)When a user changes the selection in a spreadsheet, this function runs.

doGet(e)When a user visits a web app or a program sends an HTTP GET request to a web app, this script runs.

doPost(e)When a program sends an HTTP POST request to a web app, this function is invoked.

The e parameter in the above function names refers to an event object passed to the function. The object contains information about the context that caused the trigger to fire, but it is not required to use it.


Please Watching My Video is Below

No comments:

Post a Comment

Post Top Ad