Documentation & FAQs

Documentation to integrate EasyCSV with any app, API, FTP / SFTP, Zapier, and more.

How to create an import form

Step 1: Click the "New Sheet" button

After logging in you will be brought to your list of spreadsheet imports. Click the "New Sheet" button.

Step 2: Configure spreadsheet import

Specify all required fields.

Pro Tip:
You do NOT have to specify an API/Webhook endpoint URL for testing the form. It can be added later when your application is ready to start accepting imports.

Step 3: Specify required and optional columns for spreadsheets being imported

In the navigation above the spreadsheet form click on "Columns & Rules".

Add any new column rules you want. You can specify if they are required. You can also choose the required data format.

When a user attempts to import a spreadsheet, EasyCSV will validate every field has the right data format and tell the user if there are any errors they need to resolve in order to finish the import.

How to process the data in your API/Application/Webhook

Step 1: Create a public API/Webhook endpoint and specify in the spreadsheet import settings

Create a public endpoint that accepts a POST of either JSON (default & preferred) or Form params data (can be chosen in the spreadsheet import form settings).

Log in and go to your spreadsheet import form. In the top nav click "Sheet Details".

Click the checkbox to "Post imports to Webhook". Then type or paste the URL of your public API/Webhook endpoint.

Step 2: Handle the incoming request from EasyCSV

Your endpoint should accept the incoming data. Validate the data is correct and safe to save. The data will come in as one http POST per row/record of the spreadsheet being imported.

Here is some example JSON that could be sent to your API/Webhook for each record (you can customize the JSON EasyCSV sends. Read section about customizing below):

{
  "import_id": 12345,
  "import_name": "product_list.csv",
  "import_datetime": "2024-04-24 11:59:42 +0000",
  "import_date": "2024-04-24",
  "importer_email": "example@yourdomain.com",
  "sheet_name": "Ecommerce Product Listings",
  "sheet_slug": "product",
  "sheet_id": 67890,
  "import_code": "gft6353ruy7",
  "record_data": {
    "product_name": "Widget",
    "product_description": "Change channels on your TV.",
    "price_in_cents": 1000,
    "homepage": "https://www.widget.com?utm_source=amazon"
  },
  "virtual_fields": {
    "website_root_domain": "widget.com"
  }
}

Keys that will be present on every request for every record/row:

  • import_id
  • import_name
  • import_datetime
  • import_date
  • importer_email
  • sheet_name
  • sheet_slug
  • sheet_id
  • import_code (this is most likely going to be null. Read more here.)
  • record_data
  • virtual_fields (empty unless virtual output fields are configured)

Values that can CHANGE on every request:

  • Keys & values nested under record_data & virtual_fields will be unique per record/row of the spreadsheet being imported. Spreadsheet column titles are the keys for record_data.

Pro Tip #1:
You may want to write your code to not allow duplicate records/rows to be imported IF your system needs things to be unique. If your system allows many objects with the same content, then simply process and save each incoming record/row.

Pro Tip #2:
You may want to save the import_id or other info on any records you create in case you want to delete or fix data from a specific import.

Pro Tip #3:
You may have a use case where you want to save things imported as a "draft" needing approval from an admin.

How to send multiple records at once using bulk chunk uploading

Step 1: Create a public API/Webhook endpoint and specify in the spreadsheet import settings

Create a public endpoint that accepts a JSON POST request.

Log in and go to your spreadsheet import form. In the top nav click "Import Flow". Go down to edit the webhook/api destination settings.

Click the checkbox to "Post imports to Webhook". Then type or paste the URL of your public API/Webhook endpoint.

Step 2: Enable bulk chunk uploading

In the same "Sheet Details" form click the checkbox labeled "Post multiple records at once in bulk chunks".

Specify how many records your endpoint can handle at one time.

Click the save button and try an import.

The JSON posted will be an ARRAY of multiple records from the example above for sending single records to your webhook. You can also customize the JSON you plan to POST.

How to send all records at once as a URL to a new CSV file

Step 1: Create a public API/Webhook endpoint and specify in the spreadsheet import settings

Create a public endpoint that accepts a JSON POST request.

Log in and go to your spreadsheet import form. In the top nav click "Import Flow". Go down to edit the webhook/api destination settings.

Then type or paste the URL of your public API/Webhook endpoint.

Step 2: Enable creating a CSV file with URL

In the same Webhook/API settings form select the radio button labeled "Post to webhook with all data in a new CSV File URL".

Click the save button and try an import.

The JSON posted will contain a csv url field and other standard EasyCSV import fields. You can also customize the JSON you plan to POST.

How to send a test row to your webhook

Step 1: Add your API webhook URL to your sheet

If you have not already specified a public API webhook URL for your spreadsheet then click edit on the sheet and add one.

Step 2: Click the 'Send Test Row' button.

If you are logged in as an admin, view the spreadsheet import form. You will notice a 'Send Test Row' button in the right side column. Simply click it!

How to import a CSV, XLSX, or Zip file with CSV inside from an email sent to EasyCSV

How it works:

  1. Copy and paste the custom email address for your Import Flow/Page
  2. Send emails with attached CSV or XLSX files to the email address. (You can also send emails that have a URL to a file in the email body)
  3. Your Import Flow automatically imports the file(s)!

This functionality is great for these use cases:

  • Somes apps let you scheduled report exports as CSV, XLSX, or as Zip files that are emailed to you. Set up the scheduled export email with attached CSV, XLSX, or Zip file to go to your EasyCSV email address and have it auto-import.
  • Some app or service will email you a CSV with data on a regular cadence. Have that app or service email your EasyCSV email address to import the data automatically and send it where it needs to go.

How to customize email import options:

  1. Click the "Sheet Details" link at the top of an import page when you are logged in as the import page owner.
  2. Click the checkbox "Import sheets sent via email as an attached CSV".
  3. You will see a list of options expand as well as the unique email address for this sheet import page.
  4. Set the options the way you like.
  5. Any email sent to the unique @parse.easycsv.io email address with a CSV, XLSX, or Zip file with CSV inside as an attachment will be auto-imported when this option is enabled.

Need to fetch data from a specific tab in an XLSX file? You can specify the tab name in your import page "Spreadsheet File Options". Log into EasyCSV. Navigate to your import page. In the top nav click "Sheet Detail & Settings" > "Spreadsheet File Options". You will see a field where you can specify the tab name. Default: get data from the the first tab in the XLSX file.

How to import a CSV by posting to an EasyCSV API Webhook

  1. Click the "Sheet Details" link at the top of an import page when you are logged in as the import page owner.
  2. Click the checkbox "Import sheets posted to API Webhook".
  3. Copy the url shown for the POST request.
  4. Send the options below in the Body of the POST request like {"api_key": "...", "public_file_url": "..."} or add them to the URL as params:
    key value
    api_key your API key (get API key by clicking "Business Info" in the top nav after logging in)
    public_file_url publicly accessible URL to the CSV file
    importer_email (optional - recommended) email where import results are sent
    import_name (optional - default will take file name from URL if this option is not specified) - Name of this import
    import_code (optional) - String passed to EasyCSV that can be simply passed back to identify an import and it's validitity
    extra_columns (optional) - JSON hash that becomes added columns and values for every row/record. This arbitrary data can be used and sent to the import destination. Add up to 50 columns of static values. Example JSON hash to use as the value that would add 2 columns to every record: {"company_name": "Apple", "code": "abc123"}
  5. Send POST request to the endpoint with the proper attributes.
  6. Check the import log table at the bottom of the import sheet page to see results of your imports.

How do I customize the JSON I want to post?

Use the EasyCSV feature: "Custom JSON to post". You will find it at the top of your sheet import page if you are logged into EasyCSV and are the admin.

Let's say you have a CSV file you want to have imported to your webhook or another destination API. The column headers from the CSV file you want to import are: first name, last name, email address, street address.

Let's say you want to combine the first and last names into one field (Full Name) and you want all the column headers to be top level keys in the JSON. You also want to change the email address to just be: email. Here is what you will put in the text area on the Custom JSON to post page:

{
  "Full Name": "{{ FIRST_NAME }} {{ LAST_NAME }}",
  "Email": "{{ EMAIL_ADDRESS }}",
  "Street Address": "{{ STREET_ADDRESS }}"
}

You will see values from the importing sheet need to be surrounded by curly braces {{ }}, capitalized, spaces become underscores _ , and also surrounded by double quotes " ". The JSON keys will be what the destination API is expecting. So try to match those exactly to what that API is looking for.

Tip: On the Customize JSON to post page you will see some helper text that tells you how to write variable names to be populated from column rows of the CSV file you want to upload.

How do I add an Authorization Header or a different custom header?

After logging into EasyCSV, navigate to your sheet import page. At the top of the page, when logged in, you will see a link for "Request Headers". Go to that page to add authorization and other custom headers.

To add an authorization header put in these values:

  • Key:
    Authorization
  • Value:
    <authorization type> <the authorization token>

Example:

  • Key:
    Authorization
  • Value:
    Bearer 12345abcde

All header values are encrypted in the EasyCSV system for security.

You may also add values from each row in the CSV file as part of your custom request header values using EasyCSV dynamic syntax. When you go to create or edit a custom request header you will see the syntax to copy & paste.

How do I group rows in my file to post nested JSON with an array of rows?

This feature is only on the EasyCSV Business Plan and above.

Failing a record/row instead of importing it to your application

If you need to fail a record you should return a proper error code in the 400 or 500 range with a response body giving the reason. All failed records will be shown to the user with the reason (response body you return to EasyCSV) why they failed so the user can try to fix the problematic records and re-import them.

How to limit access for spreadsheet import - 4 options

Simple Password

Specify a simple password a user has to enter to see the spreadsheet upload form.

Require Google Account login to import

Users will be required to sign-in with their Google Account before importing spreadsheets.

Require that a user's email address is for a specific domain

Requiring Google Account sign-in first is a pre-requisite for whitelisting email domains. After specifying a list of acceptable email domains, if the user's Google Account email address is not for an email domain in your whitelist then they will not be allowed to import spreadsheets.

Trade unique tokens with your app for trusted uploads

Step 1: Create any string to add as an import code when a user wants to make an import into your application. Either generate the import code in a unique way only your system knows is real or save the import code to lookup it's validity later.

Step 2: Force your user to click on a link to go to your easycsv.io spreadsheet upload form. Append the unique token/code to the url with "?import_code=12345example". Full example: https://www.easycsv.io/company_slug/sheet_slug?import_code=12345. This code will flow back to your app when your users does an import.

Step 3: In your API/Webhook look for the "import_code". Fail any imports that do not have an "import_code" or if they have an "import_code" your system doesn't recognize.

How to setup Slack + EasyCSV

Step 1: Get Webhook URL for your Slack workspace

Go here and follow directions under the 'Setup Incoming Webhooks' section: Get webhook for Slack workspace

Step 2: Copy & Paste webhook URL in EasyCSV

Copy your webhook URL from Slack. It will look like this: https://hooks.slack.com/services/12345/abcde/easy123789

Login and click on "Business Info" in the top nav dropdown menu. Access if by clicking on your name in the upper right corner after logging in.

Paste your webhook URL in the "Slack Webhook URL" field.

Click save and you will start seeing info about imports being saved in the Slack Channel you specified for the webhook.

How can I tell if another app or API is having an outage?

Here are some links to many app/api status dashboards: