Connecting to Google Sheets
Last updated
Last updated
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 submit an issue or reach out on our discord server and we'll get this page a lift.
sheetwork interacts with Google Spreadsheet via the gspread 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.
There are a number of ways in which you can set/get those. The easiest is probably to use Signed Credentials
Head to Google Developers Console and create a new project (or select an existing one)
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"
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:
sheetwork expects you to place your credentials file in a specific location:
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.