Skip to main content

Welcome back friends of Zapier! Today, let’s have a look at the Import CSV transform! This function will allow you to pass Zapier either a string in Comma Separated Values (CSV) format or a CSV file coming to you from a prior step in the Zap. 

For advanced users, Zapier can also offer you line item objects which can unlock advanced functionality in the apps we offer which support them.

Add Inbound Emailed Spreadsheet Files to a Google Sheet

Let’s say you have a Gmail inbox that receives automated emails that have a CSV attached, and you would love to have those added to a Google Sheet automatically for you. Zapier can help with that!

If your purpose is to interact with attachments in Gmail, using the “New Attachment” trigger is the best one to use!  

In some cases, more than a single attachment may be sent in a single email. For example, image footers are separate attachments which can be displayed inline in the email you are viewing. In these cases, if you are NOT using “New Attachment”, Zapier will by default take all of the attachments and compress them into a .zip file and give you access to that data under the “All Attachments” key in the Zap Editor. If you were to send a non-CSV file as the input, Zapier would display an error message instead.

That is why I default to simply using “New Attachment” so we can trigger off of each individual file attached to the emails matching your trigger settings. Not only that, but this trigger allows you to select specific labels so you can use the Gmail app itself to set up filtering rules and send only the emails you want Zapier to see into the folder/label that your Zap is watching.

1ab0000eb6c25404032dbef843f0a23a.png

You can skip using the “Search String” option since you are controlling the input via the method above.

Keep in mind: 

  • If the emails you are being sent have more than one attachment, this Zap will fire for each attachment.  

  • If there are nothing but CSV files attached -- that is just fine!  However, if there are non-CSV files, Zapier will return errors when we try to run those files through the Format process.  

  • If this is a rare situation, it would be OK to ignore those, but if your Zap returns any errors the vast majority of the time it runs, Zapier will turn it off and send you an email to let you know.  

  • If you needed to avoid that, you could use a Filter by Zapier step to only continue if the files in question are the ones you want. That said, every time your Filter allows the Zap to continue running we would use 1 Task from your limit, but we never charge you a Task if your Filter prevents the Zap from running!

While not a Formatter by Zapier step, if you did have a large chunk of CSV data which you wanted to process through Zapier, you don’t need to email it to yourself or anything like that: you can use our Import Export](https://zapier.com/help/import-export/) guide to pull this data in via the trigger step!

 

Wrapping Up

This has been a brief look at our Formatter's Import CSV feature and some ways to use it. If you have any questions, comments or concerns please let us know what you think in the comments below!

Be the first to reply!

Reply