Help

Import CSV files into Zaps

Last updated:

You might find yourself needing to extract a file that is within an existing Zap of yours but can’t currently get access to this information. This is where the Formatter transform comes in, you can use it to import your CSV file so that you can use the data in the rest of your Zap.

We can use either a file object or a public URL that points to your CSV file in order to get your data.

Example

You’re sent a CSV file from a client via an email, but you need this data into an existing spreadsheet that you have in Google Sheet. In using this workaround, you can make sure this data gets added without having to manually put this data in yourself.

Note

Our Import CSV File only supports ASCII and UTF-8 encoding today. You'll need to re-encode your CSV in order to import it into your Zap.


1. Add a Formatter Utilities step to your Zap

  • To add a step, click the plus + icon.
  • Search for and select Formatter by Zapier.
  • Click the Choose Action Event dropdown menu and select Utilities.
  • Click Continue.

Formatter Utilities action


2. Set up your options

Next, customize the options for the action:

  • Transform: select Import CSV File
  • CSV File: add the file that you want to import by clicking the dropdown menu. This field can accept a file from a previous step, a public URL that points to your CSV file, or even text entered in CSV format.
  • Force First Row as Header Row: in most cases, this option can be left as no. If you find on Step 4 that you’re not able to pull in any header fields (this will appear as false) during the test, revisit this step and select Yes.
  • Type of CSV file: by default, the transform utility will try to detect the type of CSV file. If the file type isn't being recognized, you can select it in this dropdown menu.

How to set up your Import CSV File options


3. Test your step

Once you’ve set up your action, you can then test it to see how your data appears after it's transformed by Formatter. There are three output fields:

  • header - was a header found in the CSV file?
  • csv_text - a text field that includes all of the text from the CSV file.
  • line-items - line-item fields for each of the CSV file's column values.

Tip

If your header field shows as “false”, repeat Step 3 and change Force First Row as Header Row to Yes, then repeat this step again.


4. Troubleshoot common problems

I don't see my full CSV file when I run a test step

Zapier limits the test step to 1,000 characters of text and 50 line-items.

Error: CSV Import only supports file sizes < 150K

The Import CSV File utility only supports importing files that are 150 KB or less in size (around 1,000 rows of a 10 column CSV file). You'll need to split the CSV file into multiple files if it's too large.

Error: Could not determine delimiter

The CSV file you're trying to import doesn't use a recognized delimiter (commas, semi-colons, tabs), or the delimiter was not able to be recognized. If you know your delimiter or you have a One Column CSV, you can select that in the Type of CSV File option.

Error: utf8 codec can't decode byte xxx in position yyyy: invalid continuation byte

The Import CSV File utility only supports ASCII and UTF-8 encoding. You'll need to re-encode your CSV in order to import it into your Zap.

My action app does not support line items

Not all apps support line item fields in Zapier. One option is to add Google Sheets and its Create Spreadsheet Row(s) action to your Zap, which accepts line item fields mapped to columns. Once the data is in the sheet, you can use and manipulate this data in your Zaps.

Once you've set up the Formatter step, you'll continue setting up the rest of your Zap by adding another action. Be sure to use the output from the Formatter step in your next action step.

Note

As the output from this action is in line-item format, this means we data can only be inputted into actions that support line-items fields. One option here is to use Google Sheets and its "Create Spreadsheet Row(s)" Action, which accepts line-item fields mapped to columns. Once the data is in the sheet, then other Zaps can be created to manipulate it


Need More Help?

Contact Support

Tell us about your problem, and we’ll find you a solution or you can email support.
Get Help

Hire an Expert

We have a directory of professionals across the globe who are ready to help.
Find a Zapier Expert

Zapier Community

Connect with other Zapier users and industry professionals to get help crafting the perfect workflow.
Check out the community