cancel
Showing results for 
Search instead for 
Did you mean: 

Configure Google Drive

DishaKulkarni
Level 4
Hello,

I am trying to upload a file to Google Drive via BluePrism
To test the Connector for Google Drive, I downloaded he asset from digital exchange 
The process worked fine for files.create method and gave HTTP Status Code: 200
22015.png

The configurations were as follows
22016.png
Data 2 field has location of a random pdf from my pc
22017.png

22018.png

I have Google OAuth enabled and valid


My question is, which Google drive did the file get created in and How to check the result of action
Since I have not given any location of drive anywhere.


------------------------------
Disha Kulkarni
------------------------------
1 BEST ANSWER

Best Answers

When you navigate to the user interface at https://drive.google.com/  , do you see any file?

Alternatively, have you tried the drives.files.list action to see what files you have?

------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

View answer in original post

16 REPLIES 16

Hi Disha,

The file gets created in the root directory by default. You can add additional parameters based on this https://developers.google.com/drive/api/v3/reference/files/create



------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

There is no Drive account linked to the Google service account. I cannot find the file in existing drive account. Is there any error in configuration and settings?

------------------------------
Disha Kulkarni
------------------------------

When you navigate to the user interface at https://drive.google.com/  , do you see any file?

Alternatively, have you tried the drives.files.list action to see what files you have?

------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

Yes, files.list method is listing the created files.

Alternatively I've given editor access to my service account for a drive folder.
So when I use files.list method, it's listing files both from root directory as well as shared folder. 
But when I create files, it automatically creates in root directory.

What is the syntax or procedure for adding parameters like Parents Id in my input, so that file gets uploaded at the desired location?

------------------------------
Disha Kulkarni
------------------------------

@DishaKulkarni,

Since you're using a service account to upload the file I believe you'll need to make use of sharing to have multiple parents. That means there's a query parameter you'll need to add to your request in addition to the list of parents. The query parameter is supportsAllDrives ​and it needs to be set to true. So the request would look something like this:

files?fields=[fields]&supportsAllDrives=true

For the parents list, I believe the request body template will need to look something like this:

{
  ...
  "parents": [ [Parents] ] 
}​


In this case, [Parents] is a Blue Prism Text data item that should contain a list of the parent ID's (ex. "root","jdoe","bobsmith"). When the data item is replaced in the actual request you're left with a JSON array of strings which are the ID's of the other users that should be parents.

Hope that helps.

Cheers,



------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Thank you.
The request parameter should be added in fields section of the inputs in action stage?
If yes, how to set supportsAllDrives and parents together as a text data item to be included as Fields in the inputs

------------------------------
Disha Kulkarni
------------------------------

Hi Disha,

Going through this thread, I think that Eric is trying to say that you can add these additional input parameters in your Web Service setting as show below:

Step I: Add the additional parameters under the 'Parameters' section of the action 'drives.files.create': 

21776.png

Step II: Make the changes in your request definition under the 'Request' section of the action 'drives.files.create':

21777.png

Step III : Once you save the changes, access the same action from Process Studio and pass all the parameters in your action:

21778.png

NOTE: I haven't tested the same as I do not have Google service account but you can check once if it works for you.

------------------------------
----------------------------------

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please provide a big thumbs up so that the others members in the community having similar problem statement can track the answer easily in future.

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Technical Business Analyst,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------

Hello,
I configured everything you stated above

Let's say I have one parent and my parent id is xyz

This is my action stage configuration
21783.png
And the error I am getting is

21784.png

Which configuration is the mistake?

------------------------------
Disha Kulkarni
------------------------------

Hello Disha,

Can you check once for each of the parameter, if the syntax is correct or not. You can do this by clicking on the Calculator symbol beside each parameter one by one and the when the Expression wizard opens up, click on the 'Validate' button. That will help you to isolate the issue like at which parameter you have any issue.

You can show us the exact parameter value where you are getting this error that way.

21792.png

If there is an error with the expression, then upon clicking on the 'Validate' button, you will get the same exception message:

21793.png


My guess is your issue lies with the 'Parents' field although I cannot tell for sure as the entire text is not completely visible in your screenshot.

------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please provide a big thumbs up so that the others members in the community having similar problem statement can track the answer easily in future.

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Technical Business Analyst,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------