sheetwork
Contribute on GitHubChat on Discord
v1.0.0 Nicolas Jaar
v1.0.0 Nicolas Jaar
  • Introduction
  • Installation & Configuration
    • Installation & Update
    • Configuration
      • Set up your sheetwork project
      • Connecting to Google Sheets
      • Set up your sheetwork profile
  • Usage
    • Quick CLI
    • Using sheets.yml configuration
      • Basic Configuration
      • Column Operations & Advanced Controls
  • Sheetwork Operations
    • sheetwork init
    • sheetwork upload
    • Under the Hood Cleanups
  • FAQ
    • Do I need to list ALL the columns in my sheets config?
    • Do the column names need to be in the format of the original sheet?
    • What kind of cleanups or reformating does sheetwork do?
Powered by GitBook
On this page
  • Gspread & OAuth
  • Enable API Access
  • Using Service Account
  • What do you do with the credential files?

Was this helpful?

  1. Installation & Configuration
  2. Configuration

Connecting to Google Sheets

PreviousSet up your sheetwork projectNextSet up your sheetwork profile

Last updated 4 years ago

Was this helpful?

The Google Developer Console UI changes often, so it may be different that what is explained below. If that is the case, feel free to or reach out on our and we'll get this page a lift.

Gspread & OAuth

sheetwork interacts with Google Spreadsheet via the package/API. While you do not need to install it (it has been taken care of earlier when you installed sheetwork via pip), you will need to make sure you have enabled API Access for your project on the Google Developer Platform.

Enable API Access

There are a number of ways in which you can set/get those. The easiest is probably to use Signed Credentials

  • Hit the menu and head to "API & Services > Library"

  • search for "Google Drive API", hit it and click "Enable It"

  • back to the menu above, or search for "Sheets API", hit it and click "Enable It"

Using Service Account

  • Make sure you enable API access (see above)

  • Go to "APIs & Services > Credentials"

  • Hit "Create Credentials". Follow the instructions.

  • At some point you will be prompted to "Create a key". Do it and choose ".json" as the output.

  • A download will be initiated. If you open it, it will look something like that:

{
  "type": "service_account",
  "project_id": "blahsdasda123123123",
  "private_key_id": "s44i84737482234234",
  "private_key": "-----BEGIN PRIVATE KEY-----n",
  "client_email": "username@somestuff.iam.gserviceaccount.com",
  "client_id": "12312312314134123123123123",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/username@somestuff.iam.gserviceaccount.com"
}

What do you do with the credential files?

sheetwork expects you to place your credentials file in a specific location:

$ mkdir ~/.sheetwork/google

Rename your file to correspond to your sheetwork project name. In the previous step we chose to call it my_sheetwork_project so in that case your file should be renamed my_sheetwork_project.json

Move your renamed file to the folder we created two steps above.

Next, we'll set up your profile.yml file which contains: a link to your google credentials as well as your database credentials.

Head to and create a new project (or select an existing one)

Google Developers Console
submit an issue
discord server
gspread