Email Setup Guide
Follow our setup guide to set up a Fivetran Email connector to send CSVs and JSON files to your destination.
To set up the Fivetran Email connector, you need a source that sends CSV or JSON attachments via email.
Select Email from "+ Connector" on your Dashboard. This will take you to the Email setup form.
Choose the destination Schema and Table name for your destination.
Schedule emails to be sent to the provided email address.
Choose your configuration options. Using these configuration options, you can determine how the attached files are parsed by Fivetran.
File Pattern The file pattern is a regular expression that we use to decide whether or not to sync certain files. It applies to everything under the prefix. For instance, suppose the schedule report has multiple files, but you only want one of them to sync to a particular table. If you're not sure what regular expression to use, you can leave this field blank, and we'll sync all attachments. If you're feeling particularly bold, you can learn to write your own regex here.
Archive Folder Pattern If there are multiple files within archive (TAR or ZIP) attachment, you can use the archive folder pattern to filter those as well. For example, the archive folder pattern
*\.jsonwill sync from an archive folder only those files that end in a .json file extension.
File Type The file type is used to let Fivetran know that even attachments without a file extension ought to be parsed as this file type. For example, if you have an automated CSV output system that saves files without a .csv extension, you can specify the CSV type and we will sync them correctly as CSVs. Selecting "infer" will let Fivetran infer from a file's extension (
.log) what to sync. If you do choose a file type, every file we examine will be interpreted as the file type you select, so make sure everything Fivetran syncs has the same file type!
Compression The compression format is used to let Fivetran know that even attachments without a compression extension should be decompressed using the selected compression format. For example, if you have an automated CSV output system that GZIPs files to save space, but saves them without a .gzip extension, you can set this field to GZIP. The integration will then decompress every file that it examines using GZIP. If all of your compressed files are correctly marked with a matching compression extension (
.zip), you can select "infer".
Error Handling Selecting skip ignores any improperly formatted data within an attachment, allowing you to sync only valid data. Choosing fail enables you to prevent a file from syncing if any improperly formatted data is detected. With either option you will receive a notification on your dashboard if errors are encountered.
Escape Character (Optional) CSVs have a special rule for escaping quotation marks as opposed to other characters - they require two consecutive double quotes to represent an escaped double quote. However, some CSV generators do not follow this rule and use other characters like backslash for escaping. Only use this field if you are sure your CSVs have a different escape character.
Null Sequence (Optional) CSVs have no native notion of a null character. However, some CSV generators have created one, using characters such as
\Nto represent null. Note: text is un-escaped before the null sequence is matched, so don't use the escape character in your null sequence. Only use this field if you are sure your CSVs have a null sequence.
Delimiter (Optional) The delimiter is a character used in CSV files to separate one field from the next. If this is left blank, Fivetran will infer the delimiter for each file, and files of many different types of delimiters can be stored in the same folder with no problems. If this is not left blank, then all CSV files in your search path will be parsed with this delimiter.
Click Save & Test. Fivetran will take it from here.