I have a google form that programmatically creates registration forms (with associated spreadsheet) for events. These Forms will collect emails and I'd like to send a notification email to registrants who use these programmatically created forms - without having to go manually into each one of these forms/spreadsheets to insert the script that would achieve that. In other words is there a way of creating a bound script for a programmatically created google form/sheet?
相关问题
- How can I force all files in a folder to be owned
- Google Apps Script: testing doPost() with cURL
- Google Apps Script to turn in, grade, and return a
- Script fails on SpreadsheetApp.openById - Requires
- Split Lines and Bold Text within a ui.alert Window
相关文章
- How to allow access for importrange function via a
- Google app script trigger not working
- Set Date/Time to 00:00:00
- indexOf returning -1 despite object being in the a
- How can my Google Apps Script be run by others the
- How to stop execution of Google Apps Script?
- Profiling the Performance of a Google App Script
- String starts with in Google Script
Apps Script includes special APIs to let you programmatically create, read, and edit Google Sheets. Apps Script can interact with Google Sheets in two broad ways: any script can create or modify a spreadsheet if the script's user has appropriate permissions for the spreadsheet, and a script can also be bound to a spreadsheet, which gives the script special abilities to alter the user interface or respond when the spreadsheet is opened. To create a bound script, select Tools > Script editor from within Google Sheets.
Scripts that are bound to a Google Sheets file can use simple triggers like the functions onOpen() and onEdit() to respond automatically when a user who has edit access to the spreadsheet opens or edits the spreadsheet.
To make it programmatically i think you can use the installable trigger. It let Google Sheets run a function automatically when a certain event occurs, such as opening a document. Installable triggers, however, offer more flexibility than simple triggers they can call services that require authorization and offer several additional types of events including time-driven (clock) triggers,they can also be controlled programmatically. For both simple and installable triggers, Apps Script passes the triggered function an event object that contains information about the context in which the event occurred.
Check this page for more information about installable triggers
Also Apps Script includes special APIs to let you programmatically create, read, and edit Google Apps files. To build most add-ons, you'll need to be familiar with at least one of these services.
NOTE: Only users who have permission to edit a spreadsheet, document, or form can run its bound script. Collaborators who have only view access cannot open the script editor, although if they make a copy of the parent file, they become the owner of the copy and will be able to see and run a copy of the script.