title: Google Apps Script: Workflow approval Selecting approval broken
body: <p>I'm working to expand on the workflow script posted here...</p>
  
  <p><a href="http://www.youtube.com/watch?v=eduG0XZ9mDs&amp;feature=plcp" rel="nofollow">James Ferreira Workflow video.</a></p>
  
  <p>I've expanded the script and all is working fine regarding email, but I'm running into an issue with the doGet() function not working corretly.</p>
  
  <p>Here is the code from the video: (mycode for the sendEmail is different and works fine, as it uses and document template.  </p>
  
  <pre><code>function sendEmail(e) {
    var email = e.values[1];
    var Item = e.values[2];
    var cost = e.values[3];  
    var url = '&lt;ENTER YOUR PUBLISHED URL&gt;';  
    var approve = url + '&amp;approval=true'+'&amp;reply='+email; 
    var reject = url + '&amp;approval=false'+'&amp;reply='+email;
  
    var html = "&lt;body&gt;"+
              "&lt;h2&gt;Please review&lt;/h2&gt;&lt;br /&gt;"+
              Item +": " + cost+ "&lt;br /&gt;"+ 
              "&lt;a href="+ approve +"&gt;Approve&lt;/a&gt;&lt;br /&gt;"+
              "&lt;a href="+ reject +"&gt;Reject&lt;/a&gt;&lt;br /&gt;"+
           "&lt;/body&gt;";
  
    MailApp.sendEmail("jjones@beaconcloudsolutions.com", "Approval Request", 
                  "What no html?", {htmlBody: html});  
  }
  
  function doGet(e){ 
    var answer = (e.parameter.approval == 'true') ? 'Buy it!' : 'Not this time, Keep saving';   
    MailApp.sendEmail(e.parameter.reply, "Purchase Request", 
                  "Your manager said: "+ answer);     
    var app = UiApp.createApplication();
   app.add(app.createHTML('&lt;h2&gt;An email was sent to '+ e.parameter.reply + ' saying: '+ answer + '&lt;/h2&gt;'))
    return app
  }
  </code></pre>
  
  <p>So when the script runs, i get the email that shows the links for approval / rejected, but when I select the link for approval or / rejected i get </p>
  
  <p>"Sorry, the page (or document) you have requested does not exist." " Please check the address and try again."</p>
  
  <p>This link should be redirect to the published webapp, noted in the var URL and append either the var approve or reject to it and then just display a basic HTML page.</p>
  
  <p>Any suggestions on what is wrong?  the script is authorized..</p>