title: Google App Script unzip a Gmail attachment before appending the unzipped CSV to a Google Sheet
body: <p>I am completely new to Google App Script.  I'm trying to build something because I can't find a Google add-on that does exactly what I want.  But I have no idea what I'm doing!  Is anyone willing to help?</p>
  <p>Goal:  I need a script that will identify when a daily email with a particular subject line and from a particular sender arrives in my gmail inbox.  The email always has a .zip attachement.  I need the script to 1) unzip the attached - which gives me a csv file, and then I need 2) the unzipped csv file to be appended to a Google Sheet.</p>
  <p>Here is where I am starting with someone else's script:</p>
  <pre><code>function importDailyCallVolumes() {
    // Get the newest Gmail thread based on sender and subject
    var gmailThread = GmailApp.search(&quot;from:UCCX.Corpemail@company.com subject:\&quot;Daily Call Vols\&quot;&quot;, 0, 1)[0];
    
    // Get the attachments of the latest mail in the thread.
    var attachments = gmailThread.getMessages()[gmailThread.getMessageCount() - 1].getAttachments();
    
    // Here I need to add some code to unzip the attachment - how?
  
    // Get and and parse the CSV from the unzipped attachment
    var csv = Utilities.parseCsv(attachments[0].getDataAsString());
    return csv;
  }
  </code></pre>
  <p>Thank you so much to anyone willing to help an App Script newbie!</p>