I am trying to connect to Google Sheets using the Google Authentication (API Key) + Google Sheets Connection + Google Sheets Reader nodes as shown below. I have also created a service account and enabled Google Sheets API, but still get the error: “Could not retrieve spreadsheets. Check connection.”
The easiest way to get your Google Sheets into KNIME is definitively by using the Google Authentication node, which @ipazin mentioned.
It is, however, also possible to use the Google Authentication (API Key) node.
First, to solve your problem when trying to select a spreadsheet, make sure that you also have the Google Drive API enabled for you project in Google’s developer console. Listing the files in Google Drive requires access to that API, since the Google Sheets API only handles spreadsheets.
Second, in order to have the spreadsheets from your private account available to your service account, you have to share your private sheets with your service account’s email address. You can do that in browser, as if you would share it with another person. (top right corner)
The service account really is a separate account to your own Google account.
I hope this helps, if you have any further questions, please ask!
But, I still get the ‘Could not retrieve spreadsheets’ error:
I have confirmed that I have the Google Sheets API enabled:
What else am I missing? I would prefer to use the API Key node, as I would rather not share access with another platform and prefer to connect with my credentials instead. Thank you.
One other question: when writing a Google Sheet using the Google Sheets Writer node, what is the correct process to follow?
I am using the exact set up as before and successfully writing, but because this is a Service Account, I am being asked to request access from the Service Account to which the sheet was written to: