Import CSV files into Zaps

Available on plans:

Free

Pro

Team

Enterprise

You can use Formatter to import CSV files and use the data in your Zap.

Zapier can import a CSV file object from an app or from a public URL that points to the CSV file.

actionEdit icon Example

You receive a CSV file in an email and need to add the data to an existing Google Sheet spreadsheet. You can import the CSV file to send the data directly to the spreadsheet with a Zap.

1. Add a Formatter Utilities step to your Zap

  • In the Zap editor, click the Action step, or click the plus + icon to add a step to your Zap.
  • Select Format.
  • Click the Event dropdown menu and select Utilities.
  • Click Continue.

2. Set up your options

Next, set up the action:

  • Click the Transform dropdown menu and select Import CSV File.
  • Click the CSV File field and select a file from a previous step.
  • In the Force First Row as Header Row field:
    • If you select the default No, the Zap will try to determine your header field values.
    • After testing the step, if these header field values are incorrect, select Yes. The Zap will then get the header field values from row 1.
  • In the Type of CSV file field:
    • If you select the default Detect Automatically, the Zap will try to detect the file type.
    • If your file isn’t recognized when you test the step, you can select a different file type from the dropdown menu.
  • In the Encoding of CSV File field:
    • If you use the default (UTF-8), the Zap will assume UTF-8 encoding (the most popular type of file encoding).
    • If your file encoding isn't recognized, you can select a different encoding type from the dropdown menu.

3. Test your CSV import step

  • Click Test step. If the import is successful, you will see two output fields:
    • 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.
  • If the header field is true, a header was found in the file.

Formatter CSV test output

ratingStar icon Tip

If your header field is false, click Test step. Click the Force First Row as Header Row field and select Yes, then test the import action again.

After importing your CSV file with Formatter, you can use the line items in the rest of your Zap.

4. Troubleshoot common problems

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

The test step is limited to 1,000 characters of text and 50 line items. When the Zap runs, it will import the full CSV file.

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 wasn’t recognized. If you know your delimiter or you have a one column CSV, you can select it in the Type of CSV File option. If your file still isn't recognized, you can select Text file (No CSV Parsing) to read the file contents as a text field, then use other Formatter steps to process the text.

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

The Import CSV File utility defaults to UTF-8 encoding. If you don't know your file encoding, you can try Latin-1 or UTF-16 from the Encoding of CSV option. Latin-1 is common for files that include diacritics, UTF-16 for files that include graphic characters. If you know your encoding and it's not one of these options, other encodings might be supported using the Custom option.

My action app does not support line items

You can use Formatter to convert line items into text strings.

Was this article helpful?
8 out of 13 found this helpful