Google Sheets datasource plugi not working?

Hello,

today I made a fresh installation of Grafana 6.7.1 on Windows 10, installed the Google Sheets datasource plugin 0.9.0 and restarted Grafana.

I created a Google Sheets datasource with my API key.

When I create a new dashbaord → Add query and enter your example Spreadsheet ID (1TZlZX67Y0s4CvRro_3pCYqRCKuXer81oFp_xcsjPpe8) I immediately get a “Metric request error”.
What I am doing wrong or how can I fix that problem?

See the screenshots:

Screenshot001068

Hi!

What does your Sheet look like? Have you tried using TimeFilter?

I just used the public demo file of the Google Sheets datasource plugin developers: https://docs.google.com/spreadsheets/d/1TZlZX67Y0s4CvRro_3pCYqRCKuXer81oFp_xcsjPpe8/edit#gid=0

Does it work with any of your own sheet? When you go to the data source settings and try “Save and test”, do you get an error?

Not it also does not work with any own public sheets.
I don’t get an error when adding the data source.

Looks like there is a step missing in the docs. You have to enable the Google Sheets API:

https://console.cloud.google.com/apis/library/sheets.googleapis.com

Thank you, but was enabled already:

Here is the demo page on the Grafana play site

Steps that I took:

  1. Created an API Key in my GCP account
  2. Enabled the Google Sheets API
  3. Created the data source in Grafana with the API Key
  4. Created a dashboard with a graph panel and started with a Google Sheets query
  5. Copied the sheet ID: 1TZlZX67Y0s4CvRro_3pCYqRCKuXer81oFp_xcsjPpe8 into the Spreadsheet ID field
  6. Enabled Use Time Filter

I am talking about a local installation, not a hosted one (which the play site is, I think).
Plugin on play site does alos work for me.

I have solved the issue by sharing the Google Sheet publicly

1 Like

Have the same problem … for my Google account I have now way to make the sheet public.

The following link had some tips setting using the Google API for Sheets and Drive to access private sheets using OAuth Keys or Service Account Keys … however something is till not working within the Grafana Gooble sheets Plug-In 0.9.0 and Grafana 6.7.3 to return the data so that it can be visualized.

By me not even the public files return data Average Temperature referred to at GitHub site for grafana google-sheets-datasource returns data …

Returns data.

I have exactly same problem.

  1. API-key created and connected to Google Sheets API
  2. Google Sheet set to public access
    Result: Error 500

Any solution to this?

2 Likes

I discovered via this stackoverflow post that you have to get the email address of the service account and share the Google Sheet with that email address to allow access without having to share the link globally.

3 Likes

Hi :grinning:
I was trying to use the Google Sheet plugin but I also have a problem during activation . In my case, the error is generated when I try to incorporate the new data source at the time of “Save & Test” and I get the following error message “Plugin health chech failed”:

In my case, I am running Grafana (v7.1.5) locally with a Raspberry model 4. I have also followed the steps of activating the API key and the Google Sheet service in Google Cloud Platform.

Could you help me with the error?
Thank you so much for everything

ewelch’s trick works, thank you.

1 Like

Work for me and thanks a lot.