To work with google sheets you need an api key. Follow the link to the developer api page: https://console.cloud.google.com/apis/dashboard

In left tab go to Library

Then in search bar write sheets

Then open this card, and click enable

Open credentials panel and click to Create credentials/ Service account

Fill in the fields as you wish

Select Viewer role

Next step u can skip
