Panduan memulai add-on Editor Google Formulir
Panduan memulai ini membuat add-on Editor Google Formulir yang menggunakan pemicu untuk mengirim email saat pengguna merespons formulir.
Tujuan
- Siapkan skrip.
- Jalankan skrip.
Prasyarat
Untuk menggunakan contoh ini, Anda memerlukan prasyarat berikut:
- Akun Google (akun Google Workspace mungkin
memerlukan persetujuan administrator).
- Browser web dengan akses ke internet.
Menyiapkan skrip
- Buat formulir Google Formulir di forms.new.
- Klik Lainnya more_vert
> Editor skrip.
- Klik Project tanpa judul.
- Ganti nama project Apps Script Notifikasi formulir, lalu klik Ganti nama.
- Klik Tambahkan file add
> HTML. Beri nama file
sidebar
.
- Ulangi langkah 5 untuk membuat 4 file HTML lainnya bernama
about
,
authorizationEmail
, creatorNotification
, dan respondentNotification
.
Setelah selesai, Anda akan memiliki 1 file skrip dan 5 file HTML.
Ganti konten setiap file dengan kode yang sesuai berikut, lalu
klik Simpan
.
Jalankan skrip:
- Beralih kembali ke formulir Anda dan muat ulang halaman.
- Tambahkan pertanyaan teks jawaban singkat ke formulir Anda. Di Pertanyaan tanpa judul,
masukkan Alamat Email. Secara opsional, Anda dapat membuat pertanyaan formulir lainnya.
- Klik add-on extension
> Notifikasi
formulir. Mungkin perlu waktu beberapa detik hingga add-on
extension muncul.
- Pada dialog, klik Configure notifications.
- Saat diminta, izinkan add-on.
- Sekali lagi, klik add-on extension
> Notifikasi formulir
> Konfigurasi notifikasi.
- Di add-on, centang kotak Beri tahu saya dan masukkan alamat email Anda.
- Untuk Kirim notifikasi setelah setiap, masukkan 1.
- Klik Simpan.
- Untuk mengirimkan respons, klik Pratinjau visibility
- Isi formulir lalu klik Kirim.
- Periksa email Anda untuk melihat notifikasi.
Langkah berikutnya
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-02-14 UTC.
[null,null,["Terakhir diperbarui pada 2025-02-14 UTC."],[[["This Google Forms add-on automates email notifications to form creators and/or respondents upon submission."],["Customizable settings allow control over notification frequency, recipient emails, and content."],["The add-on utilizes Google Apps Script triggers to execute functions when the form is opened, installed, or submitted."],["Users configure notification preferences through a sidebar accessible within the Google Form."],["The script manages authorization to access Google services for sending emails and interacting with form data."]]],["This Google Forms add-on automates email notifications upon form submissions. It notifies the form creator when a set number of responses are received and sends a custom message to respondents. Users configure notification frequency, recipient emails, and custom messages via a sidebar. The add-on manages authorization, sends re-authorization requests, and respects email quotas. Key actions include saving settings, managing triggers, handling form submissions, sending notifications, and validating user inputs. The code structure comprises the script (`code.gs`) and the HTML code (`sidebar.html`, `about.html`, `authorizationEmail.html`, `creatorNotification.html`, `respondentNotification.html`).\n"]]