title: Javascript & Gmail equivalents to Applescript & Apple Mail
body: <p>Our company receives orders from a third party proprietary website via email.</p>
  
  <p>I select an order message in Apple Mail and run an Applescript I wrote that uses applescript, awk, curl and bash to:</p>
  
  <ul>
  <li>evaluate the selected email message</li>
  <li>download any attachments to our server</li>
  <li>parse the paragraphs (plain text, not HTML - I use RegEx to get and set order details (orderId, customerName, quantity, etc.)</li>
  <li>write the order details to a MySQL database</li>
  </ul>
  
  <p>I would like to do the same with a Google App Script, Gmail and Google Cloud SQL, but don't know what languages (Javascript? Python?) and methods are best to select and get the raw text of an order email message, keep it in the cloud, and process the order.  App Script is only Javascript I think.  I have written a little Python code, but no real apps.</p>
  
  <p>Anyone have a bone to throw me?</p>