Skip to main content

7 replies

12-Amethyst
February 6, 2018

Hi Prashant,

Have a look at the Google API Reference API Reference  |  Drive REST API  |  Google Developers. In ThingWorx > Add a service > Snippets > ContentLoaderFunctions library you should be able to use the service GetXML() to make a HTTP GET request and retrieve your information from your google spreadsheet.

BW,

Andy

1-Visitor
February 7, 2018

Hi Andy,

Thanks for helping me out.

I am facing a problem which is while using that GetXML() snippet and giving the URL of the Google Sheet in its params,

I am getting this:

Now can u please help me out with this.

I tried to resolve but did not found any solution.

Thanks.

12-Amethyst
February 7, 2018

Yeah, I see the same issue for me. I have tried using the GetJSON() service & it seems a bit happier.

I think what we may need is here: https://developers.google.com/drive/v3/reference/files/export#try-it

We can use the export request to get the content of the file. The fileId and the mimeType are needed as the request parameters: have a look here for the mimeType Supported MIME Types  |  Drive REST API       |  Google Developers

We should be able to get the content this way, into ThingWorx.

This is result so far. I can get the JSON and then i can convert to string:

Andy