This is a utility to sync tables from Airtable to Postgres
Docker
Docker Compose
On a command line run
curl -fsSL https://test.docker.com -o test-docker.sh
sh test-docker.sh
On a command line run
sudo wget --output-document=/usr/local/bin/docker-compose "https://github.com/docker/compose/releases/download/$(wget --quiet --output-document=- https://api.github.com/repos/docker/compose/releases/latest | grep --perl-regexp --only-matching '"tag_name": "\K.*?(?=")')/run.sh"
sudo chmod +x /usr/local/bin/docker-compose
sudo wget --output-document=/etc/bash_completion.d/docker-compose "https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose"
Run the following on your command line
git clone https://github.com/sjain07/SyncAirtablePostgres.git
cd SyncAirtablePostgres
Add your database connection parameters
You have to add the BaseId
and Table Name
To get Base Id:
a. Go to Airtable API
https://airtable.com/appnUr44xd9unezyt/api/docs#curl/introduction
appnUr44xd9unezyt
is your BaseId
and within that BaseId
pick the table you want (like Epics
) to sync
"bases": {
"appnUr44xd9unezyt" : ["Epics"]
}
https://support.airtable.com/hc/en-us/articles/219046777-How-do-I-get-my-API-key-
docker-compose up -d --build
It will sync your Airtable Table to the Postgres DB that you specified every 5 minutes.
We at Nanonets use it to Sync data about Scrum, OKRs, Failures, Errors, CRM that we store in Airtable. We also support our customers who want data written back to Airtable from Invoices they send to us for processing Invoice Processing
- Currently only supports numbers and dates.
- Aggressively changes field and table names to avoid Postgres keywords, this could be much lighter
- Add support for JSON, Lists, Boolean etc. Currently only supports numbers and dates.
- Autodetect Bases and Tables (Requires Airtable Meta API Access)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.