Managing CSV files
Through Tray.io's CSV Editor, CSV Reader, and File Helpers connectors it is possible to import, export and manipulate CSV files of varying size in your workflows. This page will describe specific use cases for working with the CSV connectors and how to import files from different sources.
Firstly you will need to setup the authentication of your server with the FTP Client connector, for details of how to do this see FTP Client documentation.
Drag the FTP Client into the workflow and select the authentication that you setup earlier. Now Set the operation to
FTP Download or
SFTP Download depending the type of connection your server operates on, and input the path of the file you wish to download.
Setup the FTP Client
Depending on what operation you want to perform you can use the CSV Editor or CSV Reader to manipulate the file. Here we use the CSV Editor connector with the
Create CSV From File, we bring the file into this step with the File URL property linked to the output of the FTP Client with a JSON path.
Configure the CSV Editor
The Google Drive connector makes it possible to access CSV files in your Google Drive account. For a detailed explanation visit the CSV Editor documentation and navigate to the 'Create CSV from an existing file` example.
The email trigger can be used to bring a CSV file into workflow.
Please visit Email Trigger documentation for details on how to get the trigger email address.
Once complete leave the operation as its default
On Email Received. When an email arrives into this account it will now trigger this workflow, and provide an output including any attachments (such as a CSV file) that the email may have.
Bring a File Helpers connector into the workflow and set the operation as
Create File from URL. Link the URL property to the Email Trigger output to grab the attachment URL. The output from the File Helper will reveal the attachment as a file, which can then be accessed by the CSV Editor or Reader for further manipulation.
Accessing CSV with the Email Trigger
The S3 connector requires authentication before it can be used, for a detailed explanation of how to do this please visit the AWS S3 documentation.
Use the AWS S3 connector with the
Get file from S3 bucket operation to grab the file from the S3 bucket. You will need to specify the Bucket name in the properties panel.
Get the file from your AWS S3 bucket
The AWS S3 bucket will expose the file's URL which can be brought into the workflow by the by the CSV Editor's
Create CSV From File operation.
The HTTP client is often used to call a URL which returns a file within the body. The file can be accessed very simply by using the CSV Editor connector. Simply select the
Create CSV From File operation and link the File URL property with the output from the HTTP connector. Running the workflow will expose the file in the CSV Editor's output.
For details on how to use the HTTP Client please visit HTTP Client documentation
Using the HTTP Client to bring a file into the workflow