title: Retrieve csv attachment file from gmail and place the data in a google spreadsheet
body: <p>I currently receive emails from a specific source with multiple attachments specifically csv attachments. What I need is to retrieve the data from the csv attachment. I've looked into creating a Google App Script which I hear can get the job done based on my research but perhaps there is a better way if so please advice.</p>
  
  <p>I wrote a pseudo code of what I would like the script to do:</p>
  
  <ol>
  <li>Determine who sent the email. If its the source that I need then follow to step 2.</li>
  <li>Look at the subject of the email if its the subject that I need then proceed to step 3.</li>
  <li>If step 1 and 2 are good then the next step is to retrieve the data from one of the csv attachments(based on the name) this is because there could be more than one attachment in the email.</li>
  <li>Open the attachment copy the data and paste it in either a google spreadsheet or excel spreadsheet which is created dynamically OR save the attachment to my google drive in a specific folder but either one could work. The trick here is to loop through all the emails in my inbox in past month and achieve the above task.</li>
  </ol>
  
  <p>Thanks everyone for your help and I hope I was clear in my specifications.</p>
  
  <p>Links I found to be helpful to me but not quite exactly what I need.</p>
  
  <p><a href="https://www.johneday.com/422/time-based-gmail-filters-with-google-apps-script" rel="nofollow noreferrer">Create time-based Gmail filters with Google Apps Script</a></p>
  
  <p><a href="https://stackoverflow.com/questions/10420435/trigger-google-apps-script-by-email">Trigger Google Apps Script by email</a></p>