REST API Sheets v4 - No Field Names

I have a working connection with Google Sheets but I am experiencing issues with rendering the field names (Col names), which prevents me from doing anything else but listing the sheet values.

I understand from other posts on the Community, e.g. https://community.skuid.com/t/calling-third-party-rest-api-with-skuid that it most probably have everything to do with “Path to Content”, but I have been testing with all possible combinations (at least it feels like that) and I am in need of some input that would enable me to proceed with getting a proper Google Sheet integration with Read, Insert, Update, Delete commands fully functional.

I have been referring to the Google API Explorer
https://developers.google.com/apis-explorer/#p/sheets/v4/

and been using both:
sheets.spreadsheets.values.get
sheets.spreadsheets.values.batchGet

e.g.
/v4/spreadsheets/1xWSUmE0x10Ci3pUu_KgDPU8DNU4bWb2Edy2gv2tLH6o/values:batchGet?majorDimension=DIMENSION_UNSPECIFIED&ranges=Sheet1&valueRenderOption=FORMATTED_VALUE&fields=valueRanges%2Fvalues

What am I missing?

Cheers

Erik

Erik, I personally haven’t tried using v4, but I did get this to work using v3, and I recall being able to find the Column / Field Names within the returned payload, you may have to have a separate Model that just gets the sheet “Metadata” while another Model gets the sheet “Data”, since if you use Path to Contents to limit the Model data down to the Array of data records, you will lose the “metadata” which is available in a different Path to Contents. Solution: Use two Models, each with the same URL, but with different Paths to Contents, one Model for Metadata, one Model for Data.

Here is a post where I walk through connecting to Google Sheets using v3 of the API:

https://community.skuid.com/t/can-i-use-data-services-to-connect-to-a-google-sheet

Hi Zach, thanks for reaching out. Oyes, I have been reading your post multiple times and I got v3 to work. But with v4 it is a whole different ballgame, but your suggestion of using two models sounds  as it will work. Will refer back once I have tried this out.

Hi Erik, did you get this working? I tried following https://community.skuid.com/t/can-i-use-data-services-to-connect-to-a-google-sheet but commented there I’m blocked just getting the model to access the sheet. What relative URL did you use in the data source URL? Thanks.

@Erik Hello, could you please share the instructions/documentation/steps which you followed to set up the connection between google sheets and Skuid. We are trying to do this in our org it would be really helpful for the community members to get these instructions from someone who already did this. Thank you.