title: How to set correct answer text in google forms from spreadsheet using script
body: <p>I want to make auto-grading short-answer quiz using google forms.</p>
  
  <p>The data is in spreadsheet.</p>
  
  <ul>
  <li>column A has questions.</li>
  <li>column B has correct answers.</li>
  <li>column C has explanations.</li>
  </ul>
  
  <p>The code below makes quiz, but don't set correct answer in each question.</p>
  
  <p>"item.createResponse(an);" seems not working.</p>
  
  <p>How do I set correct answer?</p>
  
  <pre class="lang-js prettyprint-override"><code>let form = FormApp.openById(formID);
  form.setIsQuiz(true);
  
  // get data from sheet
  let ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('문제');
  let range = ss.getDataRange();
  let data = range.getValues()
  
  data.forEach(function(el){
  
      // data
      let qu = el[0];                       //question
      let an = el[1].trim().toUpperCase();  //correct answer
      let ex = el[2];                       //explanation
  
      // create each question
      let item = form.addTextItem();
      item.setPoints(1);
      item.setTitle(qu);
  
      // create correct answer
      item.createResponse(an);
  
      // create explanation
      let exp = FormApp.createFeedback().setText(ex).build();
      if(ex != '') {
        item.setGeneralFeedback(exp);
      }
    })
  </code></pre>