// Short CSAT survey (4 questions) // 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("Short CSAT survey (4 questions)"); form.setDescription("Thanks for getting in touch with [Company]. Four short questions about the help you got; it takes about a minute."); form.setConfirmationMessage("Thank you. If your problem is not solved, reply to this message and we will pick it up again."); form.addScaleItem().setBounds(1, 5).setLabels("Very dissatisfied", "Very satisfied").setTitle("Overall, how satisfied are you with the help you got?").setRequired(true); form.addMultipleChoiceItem().setChoiceValues(["Yes","Partly","No"]).setTitle("Is your problem solved?").setRequired(true); form.addScaleItem().setBounds(1, 5).setLabels("Very difficult", "Very easy").setTitle("How easy was it to get your problem solved?").setRequired(true); form.addParagraphTextItem().setTitle("What is the one thing we could have done better?").setRequired(false); Logger.log("Edit your form: " + form.getEditUrl()); Logger.log("Share this link: " + form.getPublishedUrl()); }