How to Generate CSV Files

Create a CSV file from Zapier, Integromat, or a simple POST Request from JSON data.

Generate a CSV File using the Zapier Webhook Action

  1. After logging in to EasyCSV, click the "All CSV Generators" link after clicking to open the top nav behind your username.
  2. Create a CSV Generator
  3. After you create a CSV Generator you will get a webhook URL to send a POST request to.
  4. In Zapier, create a new Zap.
  5. For the first trigger step choose any App where the data is coming from.
  6. For the action step, choose "Webhooks by Zapier".
  7. For the field "Choose Action Event" choose "POST".
  8. Click the continue button.
  9. For the "URL" field paste the webhook for your CSV Generator from EasyCSV.io Zapier create a CSV file.
  10. For "Payload Type" select "Json"
  11. Data will be your key/value pairs. The keys in the left-column will become your header row of the generated CSV file. The values will be the first row of data. For the values, you will want to select the values from your first trigger step of the Zap.
  12. For "Wrap Request in Array" select "Yes".
  13. You do not need to do anything else and can click the Continue button.
  14. Test your Zap and then turn it on. You are all set!
  15. You can check the import log table at the bottom of your EasyCSV CSV Generator page for details on successful generations or errors.

Generate a multi-row CSV File from Zapier line-items (like from an Invoice)

How-to Video

Step-by-step description

  1. After logging in to EasyCSV, click the "All CSV Generators" link after clicking to open the top-right nav on the page behind your username.
  2. Create a CSV Generator and specify if you want the CSV file emailed to someone or uploaded via FTP/SFTP. We recommend you email your file to YOURSELF when doing this initial setup and testing. Then change it to email the real recipient after you verify everything is working as expected.
  3. After you create a CSV Generator you will get a webhook URL to send a POST request to.
  4. In Zapier, create a new Zap.
  5. For the first trigger step choose any App where the data is coming from. For example, maybe it's receiving a new Invoice from Xero or Zoho Books.
  6. To massage your line-item data into CSV-like rows we will add an action step with the "Formatter" by Zapier helper. Click the small (+) to add an action step and search for "Formatter" by Zapier.
  7. For the "Action Event" dropdown choose "Utilities"
  8. For the "Transform" dropdown choose "Line-item to text"
  9. In the Input field we will double-slash (//) separate a list of key:value pairs that will be parsed by EasyCSV. Use the double-slash (//) as the column separator. For example, for each line-item we want to create two columns in a CSV file. One for description of the item and one for the total price. We would type something like this in the Input field: description:(select the description value in Zapier for the line-item)//total:(select the total value in Zapier for the line-item) (screenshot example below) Zapier line-items to array and CSV utility action
  10. For the "Seperator" field type three pipes: |||
  11. Click the "Test & Continue" button.
  12. For the final action step, choose "Webhooks by Zapier".
  13. For the field "Choose Action Event" choose "POST".
  14. Click the continue button.
  15. For the "URL" field paste the webhook for your CSV Generator from EasyCSV.io
  16. For "Payload Type" select "Form" if it's not already selected
  17. Data will be the utility step result. For the left-field type "data". For the right field click in the field and open the "Utilities" option in the fly-out. Click "Show all options". Click the option titled "Output" text. Zapier line-items to array and CSV utility post to EasyCSV
  18. For "Wrap Request in Array" select "No" if it is not already selected.
  19. You do not need to do anything else and can click the Continue button.
  20. Test your Zap and then turn it on. You are all set!
  21. You can check the import log table at the bottom of your EasyCSV CSV Generator page for details on successful generations or errors.

Generate a CSV File using a POST request from JSON

  1. After logging in, click the "All CSV Generators" link after clicking to open the top nav behind your username.
  2. Create a CSV Generator
  3. After you create a CSV Generator you will get a webhook URL to send a POST request to.
  4. Send your POST request to your webhook URL with the param "data" consisting of an array of JSON objects (key/value pairs). Each item in the array will become a row in the CSV file. The keys of the first object will become the CSV header row. Example CURL:
    curl --location --request POST 'http://www.easycsv.io/generate_csv/12345-f9ae-678-b518-a84a786374c5?data=[{%22name%22:%20%22buc%20doe%22,%22email%22:%22bucdoe@easycsv.io%22}]'
  5. You can check the import log table at the bottom of your EasyCSV CSV Generator page for details on successful generations or errors.

Generate a CSV File using the Integromat Webhook Action

  1. After logging in, click the "All CSV Generators" link after clicking to open the top nav behind your username.
  2. Create a CSV Generator
  3. After you create a CSV Generator you will get a webhook URL to send a POST request to.
  4. In Integromat, create a new Scenario.
  5. For the first step of your scenario choose any App where the data is coming from.
  6. For the last step, choose the "HTTP" module.
  7. For the HTTP module choose the type "Make a request".
  8. For the "URL" field paste the webhook for your CSV Generator from EasyCSV.io Integromat generate a CSV file.
  9. For "Method" select "POST"
  10. For "Query String" we will add the key "data". Then type an array of JSON. Example in screenshot and also below:
    [{"name": name_value_from_first_step, "email": email_value_from_first_step}]
    The keys of the first record will become the CSV header row and the values will be the first row of data after the header row.
  11. For "Body Type" select "Raw".
  12. For "Content Type" select "JSON".
  13. You do not need to do anything else and can click the Ok.
  14. Test your Integromat Scenario and then turn it on. You are all set!
  15. You can check the import log table at the bottom of your EasyCSV CSV Generator page for details on successful generations or errors.

Special syntax for dates, times, and uniqueness for your files & emails

You will most likely want to include some form of a date, time, or uniqueness in your CSV Generator. Whether it's for the output filename or for the email subject line or body copy. Use the special syntax below in your CSV Generator to have these values set when a file is generated.

Syntax Example(s)
{MMDDYYYY}
{YYYYMMDD}
Filename: leads_to_hubspot_{MMDDYYYY}.csv
Email Subject Line: New CSV File for {MMDDYYYY}

leads_to_hubspot_01232021.csv
New CSV File for 01232021
{MMDDYY}
{YYMMDD}
Filename: leads_to_hubspot_{MMDDYY}.csv
Email Subject Line: New CSV File for {MMDDYY}

leads_to_hubspot_012321.csv
New CSV File for 012321
{DDMMYYYY} Filename: leads_to_hubspot_{DDMMYYYY}.csv
Email Subject Line: New CSV File for {DDMMYYYY}

leads_to_hubspot_23012021.csv
New CSV File for 23012021
{DDMMYYYY} Filename: leads_to_hubspot_{DDMMYY}.csv
Email Subject Line: New CSV File for {DDMMYY}

leads_to_hubspot_230121.csv
New CSV File for 230121
{24HHMMSS} Filename: leads_to_hubspot_{MMDDYY}_{24HHMMSS}.csv
Email Subject Line: New CSV File for {MMDDYY} - {24HHMMSS}

leads_to_hubspot_012321_182330.csv
New CSV File for 012321 - 182330
{YYYY}
{MM}
{DD}
Filename: leads_to_hubspot_{YYYY}.csv
Filename: leads_to_hubspot_{MM}-{DD}.csv

leads_to_hubspot_2021.csv
leads_to_hubspot_01-21.csv
{UNIQUE_ID} Filename: leads_to_hubspot_{UNIQUE_ID}.csv
Email Subject Line: New CSV File - {UNIQUE_ID}

leads_to_hubspot_a1b2c4d5.csv
New CSV File - a1b2c4d5
{FILENAME} Email Subject Line: New CSV File - {FILENAME} New CSV File - leads.csv
Need something else? Email support@easycsv.io and ask for what you want and give us an example of how you will use it. We will probably add it quickly for you.

How do I send the generated CSV files to different emails for my individual users?

In addition to passing the "data" param in the post request, you can pass a param key of "recipient_email" and the value of that param being the email of the person you want to receive the generated CSV file.