Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Export airtable tables to json/geojson on Github

License

Notifications You must be signed in to change notification settings

severo/airtable-github-json-export

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

airtable-github-json-export

Export airtable tables to json in Github

It will export one or more tables in Airtable to a JSON file on Github. The exported file will be of the format:

{
  <table_name>: [
    {
      airtableId: <id>,
      ... // all fields of the table record
    }
  ]
}

This repository is heavily inspired by https://github.com/digidem/airtable-github-export.

Configuration

The script depends on several environment variables which you can set a .env file if you run this locally:

TABLES=Table 1,Table 2
GITHUB_TOKEN=xxxxxx
GITHUB_REPO=github_repo_name
GITHUB_OWNER=github_repo_owner_name
AIRTABLE_API_KEY=xxxxxx
AIRTABLE_BASE_ID=airtable_base_id
GITHUB_FILENAME=filename_for_github_export

Important: you have to provide the list of tables, since Airtable doesn't give access to it through its API. There are some ways to fetch it, but these methods might break at any moment, and we preferred not to rely on them.

To fill all these variables:

Run

Run the export with node airtable-export.js

Heroku

You can run this as a scheduled task on Heroku using the deploy button below (note that Heroku might charge you):

Deploy

Once the app is deployed visit the 'Resources' page for your app on the Heroku dashboard, make sure the dynos are turned off, and configure the scheduler to run the export command node airtable-export.js at the schedule of your preference.

Contribute

PRs accepted.

See also the upstream repo: https://github.com/digidem/airtable-github-export.

About

Export airtable tables to json/geojson on Github

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%