In this tutorial, we'll walk through the process of automatically updating an Airtable base from a CSV file hosted at a URL. We'll be utilizing the Data Fetcher extension for Airtable, which simplifies the task of importing external data into your Airtable base.
You'll learn how to connect to a CSV file, map its columns to your Airtable fields, and set up automatic updates, so your base remains current with the latest data from the CSV. This method is particularly useful for keeping dynamic data, such as inventory or pricing information, up to date without manual intervention.
Install Data Fetcher from the Airtable marketplace to automate updates from a CSV URL to your Airtable base. Data Fetcher is a free extension that facilitates the connection to CSV files hosted online, among other data types.
Once the extension is up and running, either sign up for a new Data Fetcher account for free or log in if you already have one. Use the Sign up for free option for a new account or click on the Have an account? button to log in.
After logging into Data Fetcher, you'll see the home screen. Click **Create your first request**.
To automatically update Airtable from a CSV URL, we'll use Data Fetcher to create a request that fetches and imports data from the CSV file at the specified URL.
On the create request screen in Data Fetcher, select Custom for Application. This allows us to specify a custom URL for fetching data.
Enter the URL of the CSV file you wish to import. For the purpose of this tutorial, we'll use a CSV URL for a UK government open data file: https://fsadata.github.io/fsa-headcount/data/fsa-headcount-as-at-31-january-2018.csv.
Name your request appropriately, for example, "Import CSV URL".
Choose the Output Table & View where you want the imported CSV data to be updated.
Click Save & Run in the bottom right-hand corner to execute the import.
After setting the CSV URL in Data Fetcher, the Response Field Mapping screen will appear. This screen allows you to configure how data from the CSV file maps to fields in your Airtable base.
For each column in the CSV, decide if it should be included by toggling the selection next to the column name. You have the option to map each selected column to an Existing field in your Airtable base, or to create a New field. When creating a new field, select the field type that best matches the data you are importing.
If your data has a unique ID field, Data Fetcher can use this to merge CSV rows with existing records. To do this, click the sidebar icon in the top-left.
Open the Advanced settings, and select the ID field(s) as the Update Based on Field(s).
Once you have configured the mappings, click Save & Run.
Data Fetcher will then automatically create any necessary fields in your Airtable base and update it with the data from the CSV URL.
At the moment, you have to click Run to import the CSV URL rows to Airtable manually. We can use Data Fetcher's schedule feature to automatically update Airtable from the CSV URL, even when you are not logged into Airtable or do not have Data Fetcher open.
This is a paid feature, so you'll first need to upgrade to a paid Data Fetcher plan.
Click on the Schedule tab, and click Upgrade.
A new tab will open where you can select a plan and enter your payment details.
Return to the Data Fetcher extension and click I've done this.
Under Schedule, click + Authorize.
In the window that opens, select All current and future bases in all current and future workspaces. This will avoid the need to do this step again in the future when you use Data Fetcher in other bases.
Click Grant access.
Back in Data Fetcher, the Schedule will now be turned on. You can change the schedule to the exact one you want. Then click Save.
The data from the CSV URL will now be automatically imported to Airtable. To see what else is possible with Data Fetcher, check out our Airtable integrations.