- 23 Aug 2023
- 13 Minutes to read
Airtable Sync integration: Emailed data
- Updated on 23 Aug 2023
- 13 Minutes to read
Learn how to use the Airtable Sync integration feature to bring information from external applications into a single, centralized table within Airtable. Many external systems have features that can send a CSV or .xlsx file attachment via email on a regular basis. This external source sync feature allows you to leverage that functionality to sync external data from a system without a specific native Airtable integration into an Airtable base.
|Plan availability||Business and Enterprise Scale access only|
Owners/Creators - In order to create or update synced tables, you'll need to have creator permissions in the base where you are setting up the sync.
|Platform(s)||Web/Browser, Mac app, and Windows app|
Below, we'll walk you through the general setup process for emailing data to Airtable. It's important to note that this sync is intended for workflows that involve sending an email containing a CSV attachment to Airtable. If you are wondering about best practices for CSV formatting, then hop below before proceeding. Otherwise, if you are familiar with our CSV guidelines, then feel free to start setting things up!
The first step to setting up this sync is to find the Emailed data sync option. From an open base, click to add a new table, then click the option to view more sources. This will open a window where you can browse or search for the Emailed data option.
After clicking the Emailed data option, a pop-up window will appear. Press the Get started button. This will generate a unique email address. We’ll monitor this email’s inbox for this sync. You will need to input this email address in the To field of an email or an external service that sends out automatic emails with attachments.
If needed, you can edit the prefix of the email address to something else. This prefix will become the table name of the synced table created at the end of your initial sync setup. You can use this to add a word or phrase that’ll help you identify this email address (in your email contacts suggestions, for example).
Whether you altered the prefix of the email or not, click the “Copy email” button and move on to the next step.
If you choose to change the prefix of the email address we generate, remember that only lowercase, alphanumeric, and the special characters
. are allowed.
In order to continue the setup process, you will need to send an email with a CSV or .xlsx attachment to the email address generated in the previous step. For the setup process, you can use the email service provider of your choice or the automated external attachment delivery service.
Files must be below 5MB and have a limit of 10,000 rows that can be synced. See more about CSV formatting guidelines here.
As a best practice tip, choose a file that contains all of the information that you would like to see in Airtable and excludes any other extraneous information. It’s also necessary to ensure that at least one column holds unique information in its cell values. Airtable requires this unique identifier to make sure that your data is updated properly -- without it, Airtable would not be able to know which record in Airtable each row in your CSV should correspond to. If your attachment does not contain a column of unique identifiers, then the Emailed CSV sync will not work.
Once the first attachment has been sent, there may be a slight delay, usually a minute or less, before the setup screen in Airtable updates to allow you to move along in the setup process. The message will change to Email with attachment received and the Next button will become clickable.
During this step, if we do not receive an email with a supported file attached, or if the file is running up against our limitations, then you will see an error message pop up. The screenshot below shows the example of sending out an initial email without a file attachment. To rectify this, you’ll need to click Ignore this email and wait for a different one. Then, send out a new email with a CSV file attached.
After clicking next, you’ll see a few configuration options appear in the setup window. First, you’ll want to customize how your data will be imported into Airtable. This includes choosing:
- Which columns (fields) should be imported
- Which field will be a primary field
- What type of field the data should be formatted as.
- The name of the field (If you prefer it to be different than the CSV header)
By default, all fields from the attachment will be imported. If you want to adjust the sync to only import specific fields, click the All Fields dropdown button.
This will open up a picker window. Here, you can toggle each individual field that you want to sync from the source attachment.
Selecting specific fields means that Airtable will only import those fields, whether or not new fields are added in the future. If your CSV may contain additional columns (fields) in the future and you would like those fields to be imported into Airtable, then make sure to set up the sync to import All fields.
You’ll notice that the column furthest to the left on your imported file will act as the default primary field in Airtable. To change the primary field, you’ll want to click on the dropdown of the field of your choice, ensure that the field type is supported as a primary field (formula fields are not able to be primary fields in Emailed CSV syncs), then click the Use as primary field button.
The column designated as the primary field should hold unique information if possible. We will cover more about unique identifiers in the next section.
We will do our best to automatically match field types based on the data with the attachment that you emailed us. However, you may want to customize the type of field that each column of your file will be formatted as in Airtable. In the picture below we want to change the name field from a Long text field to a Single line text field type. Click the dropdown for the field that you want to modify and then click the field type of your choice.
There are 10 field types that we support in the field customization step:
|Single Line Text|
|Long text field||Number|
The name of each column is dependent on the header row (first row) of the attachment you are using for this setup. Changing a field’s name can be done by clicking on the field’s dropdown and typing it into the name box.
In this step of the setup process, we will have you create some logic concerning the way your attachments will sync to Airtable. This step is important to consider in order to ensure that the correct records in Airtable are updated, created, or prevented from being duplicated. Just like the primary field mentioned earlier, the identifier you choose should be unique and unchanging. In this case, we will use the “Name” field, since each row in our CSV file contains an unrepeated name.
The last step of the setup process is to confirm two global settings related to the way that your sync will import attachments in the future. These two settings cover sync frequency and attachment processing. Either of these options can be modified by clicking the Change button.
- To change the sync frequency click the Change button next to The table will update automatically when an email is received setting. This will open a page where you can decide to sync automatically (periodically “check” the inbox for new emails containing an attachment) or manually (only when you choose to sync manually from the Airtable UI). When syncing manually, Airtable will only check the inbox when an editor or creator clicks the Sync now option.
- The other option has to do with attachment processing. In some cases, your CSV file might contain the entire dataset or it may only contain data from a weekly report, for example.
Let’s lay out two examples to make this clearer. Say you are importing a CSV containing employee information (Name, start date, job position, birthday, etc.)...
- Entire dataset- In this example, the CSV file being imported contains all of the employees and their information.
- If an employee is deleted from the CSV file and the Each attachment contains the entire dataset option has been chosen in Airtable, then the employee’s record in Airtable will also be deleted.
- If the Each attachment only includes updates option is chosen, then the employee’s record would remain in Airtable, even though it was deleted in the CSV source file.
- Data subset- In this example, the CSV file being imported contains a weekly report of newly onboarded employees.
- Each attachment contains the entire dataset - The resulting table in Airtable will only contain the information from the latest CSV (only this week’s onboarded employees).
- Each attachment only includes updates- The onboarded employee list would compound over time in Airtable, resulting in a more holistic employee list.
- This option includes the ability to Delete unavailable records. Clicking this button allows you to "reset" the target to the most recently emailed data set. Another way of saying it is that clicking this will remove any records from the table that correspond to removed records (records no longer present) in the most recent sync.
- The Delete unavailable records option will appear after creating the initial sync and clicking Update sync configuration from the dropdown menu located next to the name of the table and then clicking Change next to the Each attachment only includes updates setting.
- Entire dataset- In this example, the CSV file being imported contains all of the employees and their information.
Once you’ve settled on the options in these last two settings, it’s time to click Create table.
Once the synced table has been created, you can now change the name of the synced table, start adding views, add another sync source, and much more. Of course, you can always Update sync configuration as well, if sync settings need to be modified in the future.
CSV formatting guidelines
- Files must be 5MB or less
- A maximum of 10,000 records (rows) can be synced at this time. Your file can contain more than 10,000 rows, but only 10,000 will be synced
- The first row of the CSV file will be parsed as a header row which will appear as field names in your synced table. No other rows can perform this function.
- All column names in the header row must be case-insensitive and unique.
- All column names in the header row must be non-empty strings.
- The header row cannot contain more than 500 columns.
- The primary field and unique ID must be present in the header row.
Security and OAuth scopes
There are no OAuth scopes needed for this external source sync. We’ve deliberately made the email address for the inbox used in this sync a unique, long, and random address to prevent any potential accidental CSV syncs.
There is no separate plugin or app that needs to be installed for this sync to function. The data that we retrieve from the email inbox we create for this sync is transmitted securely via HTTPS and will not be used for any purpose other than the synced table.
Only the owner/creator of the sync can view the email address that Airtable generates for the sync. Owners can view the email address by navigating to the “Update sync configuration” option from the dropdown menu located next to the name of the synced table.
If a cell value contains a comma, the entire cell value should be surrounded by quotes. Otherwise, it will be split into multiple cells based on the comma.
Certain CSV exports may contain an index column by default. These columns often act as header columns in the sync process and cause the error. In these cases, you’ll need to adjust the query you are running or change the way your CSV report is being generated. The process will differ depending upon the external service you are using, but here is one fix if your organization uses Looker that allows you to remove the index column by adjusting the query.
When an Emailed CSV base or a workspace containing an Emailed CSV base is duplicated, a new Emailed CSV base will be created with a new email address. The new email address will share the same custom prefix but have a unique hash (the part after the dash, but before the domain @sync.airtable.com). This new Emailed CSV base should automatically work when using the new email address.
It may be the case that your Airtable Admin needs to enable this integration in the Admin Panel.
Right now we are not supporting compound keys, although we hope to support this down the road.
Not directly. The emailed data sync integration supports the following field types:
Single line text, Email, Long text field, Number, Date, Duration, Phone number, Currency, URL, and Percent.
Right now, likely the best workaround is to sync publicly accessible image URLs to a single text field and then configure an automation to append attachment URLs to an additional attachment field. There is a community thread where you can find more information about this workaround here.
Currently, these are treated separately and they do not need to be the same. Often, there are different goals for each. As a best practice tip, the primary field should be human legible, easy to reference, etc., whereas the Unique ID doesn’t need to be legible, it just needs to be unique and unchanging so that your CSV sync performs as expected.
By default, the assumption is that when you send something in, it will update existing items and delete items that don’t appear in the CSV. So you are essentially sending out the entire state of the system over in each sync. On the other hand, you can adjust the attachment processing setting so it will leave items in the table if there are no updates to them.
No, we do not support formula fields as primary fields with CSV sync.
In theory, yes. We do support .xlsx files. One caveat to be aware of is that if there are multiple worksheets in one file, we will only sync in the first worksheet.
10,000 records/rows per sync.
You cannot edit the data from a sync. However, you can add new fields into the same table to “enrich” the data, such as linked record and formula fields.
Our product team is aware of the need and we are actively researching how to visualize sync history.
Popular systems that work well with this sync include AEM, Mode, Marketo, Smartsheets, Google Ads, and Looker.
Currently, Facebook Ads will not work with this sync.