title: How do I create a doPost(e) function in Apps Script project to capture HTTP POST data from web service?
body: <p>I'm trying to create a script to capture data via HTTP POST from Ejunkie. When someone makes a purchase on ejunkie, they can transmit all the order data via HTTP POST to a common notification url (documentation). I want to capture that data so I can get it into a Google Sheet.</p>
  
  <p>So I've setup a sheet with a doPost(e) function like so:</p>
  
  <pre><code>// attempt 1
  function doPost(e) {
    if(typeof e !== 'undefined')
    Logger.log(e.parameters);
  }
  
  // attempt 2
  function doPost(e) {
    var data = JSON.stringify(e);
    Logger.log(data);
  }
  </code></pre>
  
  <p>which I've published as a Web App with access to anyone, and then entered this script URL as the common notification URL in ejunkie.</p>
  
  <p>I've tried a couple of test transactions, but I'm getting nothing in the Logs. </p>
  
  <p>Any ideas? Thanks in advance for any help.﻿</p>
  
  <p>Here's the <a href="http://www.e-junkie.com/ej/help.integration.htm" rel="noreferrer">ejunkie documentation</a> on this subject.</p>