// One-question CSAT survey (5-point) // How to use: open https://script.google.com, start a new project, paste this file over the sample code and press Run. // Google asks you to allow the script to create a form. The form is saved in your Google Drive and its links appear in the execution log. function createSurvey() { var form = FormApp.create("One-question CSAT survey (5-point)"); form.setDescription("Thanks for getting in touch with [Company]. One quick question about the help you got."); form.setConfirmationMessage("Thank you. A person on our team reads every answer."); form.addScaleItem().setBounds(1, 5).setLabels("Very dissatisfied", "Very satisfied").setTitle("How satisfied are you with the help you got today?").setRequired(true); form.addParagraphTextItem().setTitle("What is the main reason for your rating?").setRequired(false); Logger.log("Edit your form: " + form.getEditUrl()); Logger.log("Share this link: " + form.getPublishedUrl()); }