Home

Awesome

<p align="center"> <a href="https://github.com/TheAcharya/Airlift"><img src="https://github.com/TheAcharya/Airlift/blob/main/assets/Airlift_Icon.png?raw=true" height="200"> <h1 align="center">Airlift</h1> </p> <p align="center"><a href="https://github.com/TheAcharya/Airlift/blob/main/LICENSE"><img src="http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat" alt="license"/></a>&nbsp;<a href="https://github.com/TheAcharya/Airlift/actions/workflows/release_github.yml"><img src="https://github.com/TheAcharya/Airlift/actions/workflows/release_github.yml/badge.svg" alt="release_github"/></a>&nbsp;<a href="Github All Releases"><img src="https://img.shields.io/github/downloads/TheAcharya/Airlift/total.svg" alt="release_github"/></a></p>

An automated method to upload & merge *.csv or *.json data files with attachments to <a href="https://www.airtable.com" target="_blank">Airtable</a> database.

Core Features

Table of contents

Background

Airlift draws inspiration from our very own CSV2Notion Neo, which was inspired by Airtable’s CSV import extension. And with Airlift, we have come full circle.

To send data to Airtable, users or applications need to write custom code using libraries that connect with Airtable's API. For normal end-users who aren’t developers, this can be an extremely challenging endeavor. For most users, Airtable’s CSV import extension could be sufficient. But CSV import extension is only available on paid plan.

Furthermore, many experienced Airtable users want to send and transfer data automatically without using Make or Zapier. This is where Airlift comes into play.

Airlift is free and open-source software. But you can sponsor us if you find it useful.

System Requirements

Linux (x64)

macOS (ARM64)

Windows (x64)

Installation

Pre-compiled Binary (Recommended)

Download the latest release of the latest release here.

With Homebrew (Recommended for macOS)

$ brew install TheAcharya/homebrew-tap/airlift
$ brew uninstall --cask airlift

From source

This project uses poetry for dependency management and packaging. You will have to install it first. See poetry official documentation for instructions.

$ git clone https://github.com/TheAcharya/airlift.git
$ cd airlift/
$ poetry install --no-dev
$ poetry run airlift

Guide

$ airlift --help
usage: airlift [-h] --token TOKEN --base BASE --table TABLE [OPTION]... FILE

https://github.com/TheAcharya/airlift

Upload & Merge Data with Attachments to Airtable

positional arguments:
  FILE                               CSV or JSON file to upload

general options:
  --token TOKEN                      your Airtable personal access token
  --base BASE                        your Airtable Base ID
  --table TABLE                      your Airtable Table ID
  --log FILE                         file to store program log
  --verbose                          output debug information
  --version                          show program's version number and exit
  --workers                          total number of worker threads to upload your data (default: 5)
  -h, --help                         show this help message and exit

dropbox options:
  --dropbox-token FILE               your JSON file with Dropbox API App key
  --dropbox-refresh-token            switch to change your refresh token
  --attachment-columns               specify one or more attachment columns
  --attachment-columns-map           specify how the attachment column must be mapped in Airtable

column options:
  --disable-bypass-column-creation   creates new columns that are not present in Airtable's table
  --columns-copy                     copys value of one column to multiple other columns
  --rename-key-column                rename the key column in the file to a different key column in Airtable

validation options:
  --fail-on-duplicate-csv-columns    fail if CSV has duplicate columns;
                                     otherwise last column will be used

macOS Release

<details><summary>Privacy & Security</summary> <p>

For macOS, you have the option of two distinct releases: one packaged within a .zip archive and the other in a .pkg format. Navigate to the Privacy & Security settings and set your preference to App Store and identified developers.

<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/macOS-privacy.png?raw=true"> </p> </p> </details>

Utilise the Airlift.pkg installer to install the command-line binary into your system. Upon completion, find the installed binary airlift located within /usr/local/bin. To uninstall, you can utalise this terminal command.

sudo rm /usr/local/bin/airlift
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/macOS-installer.png?raw=true"> </p>

Prerequisite

Airtable

You must pass a single *.csv or *.json file for upload. The CSV file must contain at least 2 rows. The first row will be used as a header.

<details><summary>Obtain your Airtable's Personal Access Token:</summary> <p>
  1. Login to your Airtable account via a web browser.
  2. Go to Personal access token, click the Create new token button to create a new personal access token.
  3. Give your token a unique name. This name will be visible in record revision history.
  4. Add the following scopes to grant to your token. This controls what API endpoints the token will be able to use.
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/airtable_scopes.png?raw=true"> </p>
  1. Click ‘add a base’ to grant the token access to a base or workspace

You can grant access to any combination and number of bases and workspaces. You can also grant access to all workspaces and bases under your account. Keep in mind that the token will only be able to read and write data within the bases and workspaces that have been assigned to it.

  1. Once your token is created, the token will only be shown to you once, it is encouraged that you to copy it to your clipboard and store it somewhere safe. While you will be able to manage it in Personal access token, the sensitive token itself is not stored for security purposes.
</p> </details> <details><summary>Obtain your Airtable's Base ID & Table ID:</summary> <p>
  1. When you have a base open in a compatible web browser, you should see a URL in the address bar that looks similar to the example below:
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/airtable_url.jpg?raw=true"> </p>

In between each backslash, you will find a string that identifies the base, table, and view IDs.

<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/airtable_url_reference.png?raw=true"> </p>

We only require Base ID and Table ID for Airlift

</p> </details>

Dropbox

Airtable's API does not allow direct uploading of attachments. In order to upload an attachment via Airtable's API, the attachment must first exist at a publicly accessible url. To mitigate this problem, Airlift will utilise Dropbox as a temporary storage provider. Dropbox’s basic account offers 2GB of free storage. We believe it would be adequate for most operations. Once your attachments are uploaded by Airtable, you can delete the files from your Dropbox account.

<details><summary>Obtain your Dropbox App Key & Authorisation code (First Time Only):</summary> <p>
  1. Right-click and save dropbox-token.json file to your computer.
  2. When using --dropbox-token make sure you input the full PATH of dropbox-token.json file.
  3. Login to your Dropbox's App Console account via a web browser.
  4. Click on ‘Create app’ button.
  5. Choose Scoped access.
  6. Choose Full Dropbox access.
  7. Give your App a name. The name of the App can be unique and personal to you.
  8. Click on ‘Create app’ button.
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/dropbox_01.png?raw=true"> </p>
  1. Go to the Permissions tab.
  2. Set the permissions as shown on the screenshot.
  3. Click on 'Submit' at the bottom.
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/dropbox_02.png?raw=true"> </p>
  1. Go to the Settings tab.
  2. Copy your App key and paste into your dropbox-token.json file. Where REPLACE is your App key.
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/dropbox_03.png?raw=true"> </p>
{
  "app_key": "REPLACE"
}
  1. On first usage of Airlift, you will be promoted to visit Dropbox.
  2. Copy and paste the full Dropbox URL into your browser.
INFO: Validation done!
INFO: All the columns are verified and present in both the file and Airtable!
1. Go to: https://www.dropbox.com/oauth2/authorize?response_type=code&client_id=6zh18qgnw37ifpp&token_access_type=offline&code_challenge=TphrwcwmRtkGawgxFvWQcROFMbjsTeba9BGv0Lgi0nw&code_challenge_method=S256
2. Click "Allow" (you might have to log in first).
3. Copy the authorization code.
Enter the authorization code here:    
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/dropbox_04.png?raw=true"> </p>
  1. Click Continue.
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/dropbox_04.png?raw=true"> </p>
  1. Click Allow.
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/dropbox_05.png?raw=true"> </p>
  1. You will be presented with your authorization code. Copy your authorization code.
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/dropbox_06.png?raw=true"> </p>
Enter the authorization code here:    XXXZZaa0-poAAAAAAABZNgc9CwNdyryqoRAi4fxP2aU
  1. Paste it back into the terminal.
  2. Airlift would update and store your Dropbox refresh token into your dropbox-token.json file.
  3. This is a one time procress. You will not be asked again.

Do not share your access json token file with anyone.

</p> </details> <details><summary>Reset and Update your Dropbox App key (Optional):</summary> <p>
  1. For reasons should you decide to delete and revoke the App from Dropbox's App Console and created a new App, you would have to repeate the above mentioned steps.
  2. For easy updating of your your Dropbox App key, right-click and save reset-create-dropbox-app-key.sh file to the same location of your dropbox-token.json file.
  3. To execute your script, open Terminal, type sh and drag and drop reset-create-dropbox-app-key.sh file into the terminal.
  4. You will promted to enter your Dropbox App key.
  5. The script would overwrite dropbox-token.json file with your new Dropbox App key.
</p> </details> <details><summary>Creating your Dropbox refresh token (Optional):</summary> <p>

If you have created your and replaced your Dropbox App key in your dropbox-token.json file. You would need to re-create your Dropbox refresh token again.

You can utalise this this .sh shoukd you need to authorise and refresh your dropbox-token.json file.

#!/bin/sh

TOOL_PATH="/Users/xxx/Desktop/Airlift/airlift"
DROPBOX_TOKEN="/Users/xxx/Desktop/Airlift/dropbox-token.json"
UPLOAD_LOG="/Users/xxx/Desktop/Airlift/log.txt"

$TOOL_PATH --dropbox-token $DROPBOX_TOKEN --dropbox-refresh-token --log $UPLOAD_LOG
</p> </details>

Column Types

By default, Airlift will try to guess column types based on their content.

Some column types do not support assigning value to them because the database generates their content automatically.

<details><summary>Support Table</summary> <p>
Column Type NameSupported ValuesMultiple Values (Comma Separated)
Attachmentstring
Autonumbernumerical
Barcodestring
Button------
Checkboxtrue, false
Countnumerical
Created time------
Created by------
Currencynumerical
Date & Timestring
Durationstring
Emailstring
Formula------
Last modified by------
Last modified time------
Linked recordstring
Long textstring
Lookup------
Multiple selectstring
Numbernumerical
Percentnumerical
Phone numberstring
Ratingnumerical
Rollup------
Single line textstring
Single selectstring
URLstring
User------
</p> </details>

Examples

<details><summary>Basic creation of folders and .sh file</summary> <p>

For ease of use, usage and creation of .sh files is recommended.

  1. Create a folder called Airlift on your Desktop.
  2. Place the latest pre-compiled binary with the folder.
  3. Right-click and save dropbox-token.json file and save it within your Airlift.
  4. Within that folder, create a folder, Data.
  5. Data is where you place your .csv or .json and attachments files.
  6. Create a file using any text editor. Name the script file with extension .sh
  7. Copy and paste this syntax into the file, where xxx is the name of of your user directory and zzz is the name of your .csv or .json file.
  8. REPLACE the text with your relevent tokens and IDs.
  9. Save the script file as myscript.sh within your Airlift folder.
  10. To give execute permission to your script, open Terminal, chmod +x /Users/xxx/Desktop/Airlift/myscript.sh
  11. To execute your script, open Terminal, sh /Users/xxx/Desktop/Airlift/myscript.sh
  12. To obtain your Dropbox App Key and Authorization code, please read the Dropbox section.
  13. You can create and save multiple .sh files for different modes and configurations.
</p> </details> <details><summary>Uploading Data without Attachments</summary> <p>
#!/bin/sh

TOOL_PATH="/Users/xxx/Desktop/Airlift/airlift"
AIRTABLE_TOKEN="REPLACE"
AIRTABLE_BASE="REPLACE"
AIRTABLE_TABLE="REPLACE"
UPLOAD_PAYLOAD="/Users/xxx/Desktop/Airlift/Data/zzz.csv"
UPLOAD_LOG="/Users/xxx/Desktop/Airlift/log.txt"

$TOOL_PATH --token $AIRTABLE_TOKEN --base $AIRTABLE_BASE --table $AIRTABLE_TABLE --log $UPLOAD_LOG "$UPLOAD_PAYLOAD"

Example CSV

Cat ID,Animal Name,Location
001,Lion,Namibia
002,Tiger,India
003,Panther,India
004,Snow Leopard,Nepal
005,Cheetah,South Africa
006,Puma,South America
007,Jaguar,Brazil
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/big-cats-without-attachments.gif?raw=true"> </p> </p> </details> <details><summary>Uploading Data without Attachments (Copy Columns)</summary> <p>
#!/bin/sh

TOOL_PATH="/Users/xxx/Desktop/Airlift/airlift"
AIRTABLE_TOKEN="REPLACE"
AIRTABLE_BASE="REPLACE"
AIRTABLE_TABLE="REPLACE"
UPLOAD_PAYLOAD="/Users/xxx/Desktop/Airlift/Data/zzz.csv"
UPLOAD_LOG="/Users/xxx/Desktop/Airlift/log.txt"

$TOOL_PATH --token $AIRTABLE_TOKEN --base $AIRTABLE_BASE --table $AIRTABLE_TABLE --columns-copy "Location" "Location-01" "Location-02" "Location-03" --log $UPLOAD_LOG "$UPLOAD_PAYLOAD"

Example CSV

Cat ID,Animal Name,Location
001,Lion,Namibia
002,Tiger,India
003,Panther,India
004,Snow Leopard,Nepal
005,Cheetah,South Africa
006,Puma,South America
007,Jaguar,Brazil
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/big-cats-without-attachments-columns-copy.gif?raw=true"> </p> </p> </details> <details><summary>Uploading Data with Attachments</summary> <p>
#!/bin/sh

TOOL_PATH="/Users/xxx/Desktop/Airlift/airlift"
AIRTABLE_TOKEN="REPLACE"
AIRTABLE_BASE="REPLACE"
AIRTABLE_TABLE="REPLACE"
DROPBOX_TOKEN="/Users/xxx/Desktop/Airlift/dropbox-token.json"
UPLOAD_PAYLOAD="/Users/xxx/Desktop/Airlift/Data/zzz.csv"
UPLOAD_LOG="/Users/xxx/Desktop/Airlift/log.txt"

$TOOL_PATH --token $AIRTABLE_TOKEN --base $AIRTABLE_BASE --table $AIRTABLE_TABLE --dropbox-token $DROPBOX_TOKEN --attachment-columns "Image Filename" --log $UPLOAD_LOG "$UPLOAD_PAYLOAD"

Example CSV

Cat ID,Animal Name,Location,Image Filename
001,Lion,Namibia,lion.jpg
002,Tiger,India,tiger.jpg
003,Panther,India,panther.jpg
004,Snow Leopard,Nepal,snow_leopard.jpg
005,Cheetah,South Africa,cheetah.jpg
006,Puma,South America,puma.jpg
007,Jaguar,Brazil,jaguar.jpg

Example Folder Structure

Desktop/
├─ Airlift/
│  ├─ Data/
│  │  ├─ zzz.csv
│  │  ├─ cheetah.jpg
│  │  ├─ jaguar.jpg
│  │  ├─ lion.jpg
│  │  ├─ panther.jpg
│  │  ├─ puma.jpg
│  │  ├─ snow_leopard.jpg
│  │  ├─ tiger.jpg
│  ├─ myscript.sh
│  ├─ dropbox-token.json
│  ├─ airlift [Binary Executable File]
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/big-cats-with-attachments.gif?raw=true"> </p> </p> </details> <details><summary>Uploading Data with Multiple Attachments Column</summary> <p>
#!/bin/sh

TOOL_PATH="/Users/xxx/Desktop/Airlift/airlift"
AIRTABLE_TOKEN="REPLACE"
AIRTABLE_BASE="REPLACE"
AIRTABLE_TABLE="REPLACE"
DROPBOX_TOKEN="/Users/xxx/Desktop/Airlift/dropbox-token.json"
UPLOAD_PAYLOAD="/Users/xxx/Desktop/Airlift/Data/zzz.csv"
UPLOAD_LOG="/Users/xxx/Desktop/Airlift/log.txt"

$TOOL_PATH --token $AIRTABLE_TOKEN --base $AIRTABLE_BASE --table $AIRTABLE_TABLE --dropbox-token $DROPBOX_TOKEN --attachment-columns "Colour Image" "Black & White Image" --log $UPLOAD_LOG "$UPLOAD_PAYLOAD"

Example CSV

Cat ID,Animal Name,Location,Colour Image,Black & White Image
001,Lion,Namibia,Colour/lion.jpg,Black & White/lion.jpg
002,Tiger,India,Colour/tiger.jpg,Black & White/tiger.jpg
003,Panther,India,Colour/panther.jpg,Black & White/panther.jpg
004,Snow Leopard,Nepal,Colour/snow_leopard.jpg,Black & White/snow_leopard.jpg
005,Cheetah,South Africa,Colour/cheetah.jpg,Black & White/cheetah.jpg
006,Puma,South America,Colour/puma.jpg,Black & White/puma.jpg
007,Jaguar,Brazil,Colour/jaguar.jpg,Black & White/jaguar.jpg

Example Folder Structure

Desktop/
├─ Airlift/
│  ├─ Data/
│  │  ├─ zzz.csv
│  │  ├─ Black & White/
│  │  │  ├─ cheetah.jpg
│  │  │  ├─ jaguar.jpg
│  │  │  ├─ lion.jpg
│  │  │  ├─ panther.jpg
│  │  │  ├─ puma.jpg
│  │  │  ├─ snow_leopard.jpg
│  │  │  ├─ tiger.jpg
│  │  ├─ Colour/
│  │  │  ├─ cheetah.jpg
│  │  │  ├─ jaguar.jpg
│  │  │  ├─ lion.jpg
│  │  │  ├─ panther.jpg
│  │  │  ├─ puma.jpg
│  │  │  ├─ snow_leopard.jpg
│  │  │  ├─ tiger.jpg
│  ├─ myscript.sh
│  ├─ dropbox-token.json
│  ├─ airlift [Binary Executable File]
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/big-cats-with-attachments-multi-column.gif?raw=true"> </p> </p> </details> <details><summary>Uploading Data with Attachments using Mapping</summary> <p>
#!/bin/sh

TOOL_PATH="/Users/xxx/Desktop/Airlift/airlift"
AIRTABLE_TOKEN="REPLACE"
AIRTABLE_BASE="REPLACE"
AIRTABLE_TABLE="REPLACE"
DROPBOX_TOKEN="/Users/xxx/Desktop/Airlift/dropbox-token.json"
UPLOAD_PAYLOAD="/Users/xxx/Desktop/Airlift/Data/zzz.csv"
UPLOAD_LOG="/Users/xxx/Desktop/Airlift/log.txt"

$TOOL_PATH --token $AIRTABLE_TOKEN --base $AIRTABLE_BASE --table $AIRTABLE_TABLE --dropbox-token $DROPBOX_TOKEN --attachment-columns-map "Image Filename" "Attachments" --log $UPLOAD_LOG "$UPLOAD_PAYLOAD"

Example CSV

Cat ID,Animal Name,Location,Image Filename
001,Lion,Namibia,lion.jpg
002,Tiger,India,tiger.jpg
003,Panther,India,panther.jpg
004,Snow Leopard,Nepal,snow_leopard.jpg
005,Cheetah,South Africa,cheetah.jpg
006,Puma,South America,puma.jpg
007,Jaguar,Brazil,jaguar.jpg

Example Folder Structure

Desktop/
├─ Airlift/
│  ├─ Data/
│  │  ├─ zzz.csv
│  │  ├─ cheetah.jpg
│  │  ├─ jaguar.jpg
│  │  ├─ lion.jpg
│  │  ├─ panther.jpg
│  │  ├─ puma.jpg
│  │  ├─ snow_leopard.jpg
│  │  ├─ tiger.jpg
│  ├─ myscript.sh
│  ├─ dropbox-token.json
│  ├─ airlift [Binary Executable File]
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/big-cats-with-attachments-map.gif?raw=true"> </p> </p> </details> <details><summary>Uploading Data with Attachments (Rename Key Column + Mapping)</summary> <p>
#!/bin/sh

TOOL_PATH="/Users/xxx/Desktop/Airlift/airlift"
AIRTABLE_TOKEN="REPLACE"
AIRTABLE_BASE="REPLACE"
AIRTABLE_TABLE="REPLACE"
DROPBOX_TOKEN="/Users/xxx/Desktop/Airlift/dropbox-token.json"
UPLOAD_PAYLOAD="/Users/xxx/Desktop/Airlift/Data/zzz.csv"
UPLOAD_LOG="/Users/xxx/Desktop/Airlift/log.txt"

$TOOL_PATH --token $AIRTABLE_TOKEN --base $AIRTABLE_BASE --table $AIRTABLE_TABLE --dropbox-token $DROPBOX_TOKEN --attachment-columns-map "Image Filename" "Attachments" --rename-key-column "Cat ID" "Animal ID" --log $UPLOAD_LOG --verbose "$UPLOAD_PAYLOAD"

Example CSV

Cat ID,Animal Name,Location,Image Filename
001,Lion,Namibia,lion.jpg
002,Tiger,India,tiger.jpg
003,Panther,India,panther.jpg
004,Snow Leopard,Nepal,snow_leopard.jpg
005,Cheetah,South Africa,cheetah.jpg
006,Puma,South America,puma.jpg
007,Jaguar,Brazil,jaguar.jpg

Example Folder Structure

Desktop/
├─ Airlift/
│  ├─ Data/
│  │  ├─ zzz.csv
│  │  ├─ cheetah.jpg
│  │  ├─ jaguar.jpg
│  │  ├─ lion.jpg
│  │  ├─ panther.jpg
│  │  ├─ puma.jpg
│  │  ├─ snow_leopard.jpg
│  │  ├─ tiger.jpg
│  ├─ myscript.sh
│  ├─ dropbox-token.json
│  ├─ airlift [Binary Executable File]
<p align="center"> <img src="https://github.com/TheAcharya/Airlift/blob/main/assets/big-cats-with-attachments-rename-key-column.gif?raw=true"> </p> </p> </details>

Future Roadmap

Use Cases

Utilised By

Marker Data

<details><summary>Marker Data's Airtable Panel</summary> <p> <p align="center"> <img src="https://github.com/TheAcharya/MarkerData-Website/blob/main/docs/assets/md-database-settings_02.png?raw=true"> </p> </p> </details>

Credits

Original Idea and Workflow Architecture by Vigneswaran Rajkumar

Maintained by Arjun Prakash (1.0.0 ...)

Icon Design by Bor Jen Goh

License

Licensed under the MIT license. See LICENSE for details.

Reporting Bugs

For bug reports, feature requests and other suggestions you can create a new issue to discuss.