Files by Zapier allows you to trigger Zaps from CSV rows. This is great to use when you want to take action from large CSV files, with up to 60,000 rows. To use this action, you’ll need two Zaps:
- Zap 1: This Zap triggers every time a new CSV file is created with the app of your choice, such as Google Drive. It will send every row of the CSV file to Files by Zapier.
- Zap 2: This Zap is triggered by the action in Zap 1, and allows you to send the rows from the CSV to other apps.
When both Zaps are turned on, each row of the CSV file will be sent to another app. So, if you have 10,000 rows in the CSV, 10,000 items will trigger Zap 2.
Best practices for using this workflow
- You can only trigger 1 CSV file every 30 minutes.
- CSV files are limited to a file size of 4MB and 60,000 rows.
- Your CSV files should follow a consistent structure and naming convention for their columns each time the Zap runs. If not, headers are in a different order, or named something else, your Zap might:
- Mismapped data: If the order of the columns has changed, it might place data in the wrong place.
- Missed data: If it can’t find the expected headers, it might skip important information.
1. Set up the trigger for Zap 2
The first Zap we’re creating is Zap 2, because you need the webhook URL this Zap will create to set up Zap 1. This Zap will trigger when Zap 1 runs and send each row to any app you want to take action with.
- In the Zap editor, click the Trigger step. A dialog box will open.
- In the search box, search for and select the app Webhooks by Zapier. The right sidebar will open.
- In the App & event tab, click the Event dropdown menu.
- Select the event Catch Hook.
- Copy the webhook URL to your clipboard. You will need this for Zap 1.
You'll continue setting up this Zap later, so leave this tab open in your browser. You'll set Zap 1 using a new browser tab or window.
2. Set up Zap 1
This Zap will trigger every time a new file is added from your app and send the information to Zap 2 using Files by Zapier.
- Open a new browser tab or window.
- Go to Zapier.com and click + Create.
- In the Zap editor, click the Trigger step. A dialog box will open.
- In the search box, search for and select the app that has the CSV file you want to work with, such as Google Drive, New File in Folder.
- Test your trigger.
- (Optional) If the trigger contains more than one file type, add a filter to only trigger for CSV files.
- Click the Action step.
- In the search box, search for and select the app Files by Zapier.
- In the App & event tab, click the Event dropdown menu.
- Select the action Trigger Zaps from CSV rows.
- In the Action settings set the following fields:
- CSV File: Map a file object from the trigger step.
- Webhook URL: Add the Webhook URL copied from Zap 2.
- Optional) Has Header Row: In the dropdown field, select whether the CSV file contains header rows. By default, this is set to true.
- Select True to label output fields as the column name.
- Select False to label output fields as numbers (e.g. 1,2,3). For this option, Zapier will skip the first row.
- (Optional) Delimiter: In the dropdown field, specify how the values are separated in the CSV file. You can select either:
- Comma
- Semicolon
- Tab
- Click Continue.
- Click Test this step. This is necessary to allow you to test Zap 2 successfully.
3. Set up the action for Zap 2
Go back to the browser tab or window where you started creating Zap 2.
- Go to your Webhook by Zapier trigger and click Test trigger.
- If it doesn't find any data, retest your Files by Zapier action step in Zap 1 again.
- Click Continue with selected record.
Next, set up an action using the app you want the CSV to go to. As you will have multiple rows, you’ll must use either:
- An action that supports line items.
- To tell if your app supports line items, go to its app directory page and check the list of actions. The description will state if line items are supported.
- An action step to loop through line items before your app action.
Once you finish setting up Zap 2, turn both Zaps on.
To find out more about using Files by Zapier, visit the Zapier Community.