Using the Google APIs

Hi Everyone,

I have been reading a number of posts across the Forum on how to use Google sheets and Google drive in UiPath and for these, there are dedicated activities that have been created which makes using them relatively simple to use, however, the functions available in them are limited.

I would really benefit from understanding how I could use, for example: https://developers.google.com/apis-explorer/#search/sheets/m/sheets/v4/sheets.spreadsheets.values.clear

In the context of UiPath how would I call this? Via the HTTP Request activity or is it done via importing the Google APIs Client Library and then invoke them somehow? I have heard some developers use Python to call these API methods but I don’t know if there is a simple straight forward way to do this?

Your help and experience would be greatly appreciated and I am hoping there is a best practise approach to this or one that is commonly recognised as the ‘right’ way of doing it?

1 Like

Hello @Gerard_McNamara_Ged

I am a newcomer to using API with UiPath, but i do relate with your query.

I recently used Google Apis for YouTube.
I used Http Request activity which is working perfectly fine.

API EndPoint is passed through ‘Endpoint’ property of the activity.
The key and required data is passed in URL.

Check this link to relate what i am saying:

Hope my sharing helps even a bit to you.

Well, there are several possibilities.

1 - You can use .net classes for http request, and you can customize your request however you like.

2 - Or, in google’s Api case, you can import “Google.Apis” from nuget using UiPath Studio’s Package manager, and use it.

3 - Http Request activity, wich is more intuitive, but I don’t know it’s limitations.

The first 2 options probbabily will require a little of vb.net and api knowledges

Thankyou for this. It is very useful

1 Like

Hi @ls.naur

In option 2, if I import the package, how do actually call the methods? Is it via InvokeMethod activity?

First you need to import it, in “Imports” close to “Variables”. But usually i’d use it in invoke code. I don’t know if it’s possible to use it via Invoke Method activity, I think it depends on how this Package and its methods/classes works (can be found in its documentation)

Hi Gerard, did you have any joy with this? I’d also like to connect to a google API which doesn’t have predefined activities already setup. I’m going round in circles with various documentation but can’t find a clear guide. Thanks

Hi all… @Gerard_McNamara_Ged
Did you have any luck here? Could you share how you managed to do it or the example with us?

I’m struggling as well with this, as @jakegill is as well!

Thanks!!