title: Calling FormApp within doGet(e) function
body: <p>I am relatively new to scripting, so please be kind.</p>
  
  <p>I am trying to create a function bound to a Form within Google Apps, including a webapp which captures 3 variables (requestNum, approverNum, and status) and obtains various other information from the FormApp (e.g titles, responses, etc).</p>
  
  <p>I am receiving -  <strong>TypeError: Cannot call method "getId" of null</strong> on line 3 of the below code (which is bound to the Form).</p>
  
  <p>Any guidance in being able to call form information from within the doGet function is greatly appreciated!  Thank you. </p>
  
  <pre><code>  function doGet(e){
    var form = FormApp.getActiveForm();
    var formId = form.getId();
    var items = form.getItems();
    var d = new Date();
    var formattedDate = Utilities.formatDate(d, "GMT+11", "MMM dd yyyy");
    var conn = Jdbc.getConnection(dbUrl, user, userPwd);
  
    var stmt = conn.prepareStatement('INSERT INTO approvals '
        + '(formId, requestNum, approverNum, status, date) values (?, ?, ?, ?, ?)');
    stmt.setString(1, formId);
    stmt.setString(2, e.parameter.requestNum);
    stmt.setString(3, e.parameter.approverNum);
    stmt.setString(4, e.parameter.status);
    stmt.setString(5, d);
    stmt.execute();
  
    var nextApproverNum = e.parameter.approverNum + 1;
    var answer = e.parameter.status;
    var requestNum = e.parameter.requestNum;
    var nextApproverEmail = e.parameter.reply;
  
    var titles = [];
    for (i=0; i&lt;items.length; i++) {
    titles.push(items[i].getTitle());
    }
  
    var responses = [];
    var formResponses = form.getResponses();
    var itemResponses = formResponses[requestNum-1].getItemResponses();
      for (var j = 0; j &lt; itemResponses.length; j++) {
      responses.push(itemResponses[j].getResponse());
    }
    ....etc
  </code></pre>