// One-question CSAT survey (good or bad) // 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 (good or bad)"); form.setDescription("How did we do on this conversation?"); form.setConfirmationMessage("Thank you for telling us."); form.addMultipleChoiceItem().setChoiceValues(["Good, I'm satisfied","Bad, I'm not satisfied"]).setTitle("How was the help you got?").setRequired(true); form.addParagraphTextItem().setTitle("Sorry about that. What went wrong?").setHelpText("Only if the answer was bad").setRequired(false); Logger.log("Edit your form: " + form.getEditUrl()); Logger.log("Share this link: " + form.getPublishedUrl()); }