Trying to connect to GSUITE

Hi, I am tying to connect to gsuite - I have set up the api in google, created my keys and have entered the keys into the google scope properties. I have created a datatable and populated it with 3 records (two columns 3 rows). I have also entered the url for the google sheet. When I try to write to the sheet I get the following

GSuite Application Scope: Unable to find a constructor to use for type UiPath.Shared.Authentication.Google.Models.GoogleAccount. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path ‘AccountNo’, line 1, position 13.

I dont understand what is causing this error - is it my uipath setup or is it my google api?

Please do not refer me to any youtube videos as I have looked at 4 of them now and some are out of date.

Any help would be appreciated

Did you try using another Authentication Method?

Hi, thanks for the reply, I have tried oauth which gives me the error quoted and I have tried the service account method but that keeps asking me to log into google and then tick an option for the type of access and says I can leave the screen but then basically does nothing.

I think solving the Service Account issue will be much easier.

You might check this thread for potential solutions:

Thanks for the reply, Ill take a look, first glance it seems there is a change in the screen form the forum post to the present day

Ok i have gotten further - I have entered my email address (the user) in both the user email box and the service account email box. Now when I run the bot it asks me to confirm my account? then it asks me what permissions am I allowing for google. I sort of get why I would need to do this but once entered I am prompted to close the window, it doesn’t take me to my google sheet.
So the questions I have now are

  1. Should this happen?
  2. If it should happen does it only happen once to give me a token which I store?
  3. If I have a token where do I store it and how?
  4. If this happens everytime I use a bot then it would be unworkable so am i missing something in the workflow set up that should auto-populate these fields?

Also when adding the OAUTH client ID what should the type be set to as there is no OTHER type - I have currently set this to desktop.

ok so i think i have found part of the issue, when the bot runs it takes me to my google account (not sure why) log in page, it then prompts me to give access, which i do, it then passes a token back to me

Firstly I dont think it should do this so doe anyone know why?
Secondly I dont think the token is being stored on my machine which is why it then fails - this is permissions on my machine i believe as I have tried this on my laptop and the workflow gets further

as an aside I have set the api up using a service account and ran from my laptop and this has worked without any issue

So what you’re saying is that the machine you’re running your workflow on isn’t allowing you to store the token returned by Google’s API?

seems to be, my pc has the issue but my laptop seems to work fine - same api - different results

So, is your issue resolved or you want to fix it on your PC?

Its a yes and no answer really. In terms of being able to access google via the api then yes i can now do that using the service account.
In terms of using oath then no I still hit the problem when trying to access the api it asks me to choose an account and then select permissions - i’m not sure that this should happen and what causes it as having check posted videos this doesn’t seem to happen for other people

Did you try it on your laptop? :thinking: