Ten przewodnik wprowadzający tworzy dodatek do Edytora Formularzy Google, który używa wyzwalaczy do wysyłania e-maila, gdy użytkownik odpowie na formularz.
Cele
Skonfiguruj skrypt.
Uruchom skrypt.
Wymagania wstępne
Aby skorzystać z tego przykładu, musisz spełnić te wymagania wstępne:
Konto Google (konta Google Workspace mogą wymagać zatwierdzenia przez administratora).
przeglądarka internetowa z dostępem do internetu;
Konfigurowanie skryptu
Utwórz formularz w Formularzach Google na stronie forms.new.
Kliknij Więcej more_vert>Edytor skryptów.
Kliknij Projekt bez nazwy.
Zmień nazwę projektu Apps Script na Powiadomienia w Formularzu i kliknij Zmień nazwę.
Kliknij Dodaj plik add>HTML. Nazwij plik sidebar.
Powtórz krok 5, aby utworzyć 4 kolejne pliki HTML o nazwach about, authorizationEmail, creatorNotification i respondentNotification.
Gdy skończysz, powinieneś mieć 1 plik skryptu i 5 plików HTML.
Zastąp zawartość każdego pliku odpowiednim kodem, a potem kliknij Zapisz .
Dodaj do formularza pytanie tekstowe z krótką odpowiedzią. W sekcji Pytanie bez tytułu wpisz Adres e-mail. Opcjonalnie możesz utworzyć inne pytania formularza.
Kliknij dodatki extension>Powiadomienia dotyczące formularzy. Zanim dodatki extension się pojawią, może minąć kilka sekund.
W oknie dialogowym kliknij Skonfiguruj powiadomienia.
Gdy pojawi się odpowiedni komunikat, autoryzuj dodatek.
Ponownie kliknij dodatki extension>Powiadomienia o formularzach>Skonfiguruj powiadomienia.
W dodatku zaznacz pole Powiadom mnie i wpisz swój adres e-mail.
W polu Wyślij powiadomienia po wpisz 1.
Kliknij Zapisz.
Aby przesłać odpowiedź, kliknij Podgląd visibility
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 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"]]