1

I've been trying to upload files from my computer to Google Drive, from a Kofax Robot. Don't worry if you don't know Kofax, I don't think it matters in this case.

I have already found posts such as Upload file to my google drive with Google Apps Script (NO FORM IN GOOGLE) , but they use javascript to send the API request, which I can't easily do in Kofax.

Since the apps script will probably work for me too, the complicated part is to make the API request.

Here's the form I have on Kofax : kofax parameters kofax parameters 2

with the documentation here : https://docshield.kofax.com/RPA/en_US/11.0.0_qrvv5i5e1a/help/kap_help/reference/c_callrestwebservice.html

Maybe this will look obvious to some of you, but I have never really used API before apart from basic GET requests, so I have no idea what I can do with this.

Thanks for the help


EDIT : Since the issue has slightly progressed and someone asked me to be clearer about it, I'll add everything I know below. But I can't post my "current slution" since I don't have one, otherwise I wouldn't be posting here.

My goal is to make a GET or POST request to Google, either directly Google Drive or an Apps Script (it seems to work in similar way so I'm not sure it matters), from a Kofax Web Automation Robot.

I got more specific informations regarding how to create a POST request to upload a file from Kofax, which would look like something similar to this : kofax file upload request .

My problem currently is that I cannot execute such requests because of Authentification. There is an OAuth option in the Management console that lets a user create "applications" and "users" with forms I don't really understand. application form

I found the Kofax documentation regarding that here : https://docshield.kofax.com/RPA/en_US/11.0.0_qrvv5i5e1a/help/kap_help/mgmtconsole/c_oauthintromc.html but their example with Twitter shows something called "add application" that exists in Twitter and doesn't seem to be on Google.

There is also a type called OAuthCredentials in Kofax with all the following fields : OAuthCredentials type By manually filling an access token here I was able to run a test GET robot locally for an hour, but the refresh token didn't seem to work and the robot didn't work on the Management Console (server), which is my end goal.

Once I find exactly how to make a robot that uploads files to a Google Drive I'll make a full tutorial under this post since it looks like none exist on internet as of now.

Rilves
  • 146
  • 7

1 Answers1

0

You don't provide much details, such as how the file is chosen.

But apparently, you could use something like a Load File step and store the output in a variable with an Assign Variable step. Or just a Select File step if you can use it directly as a request body.

Once you have the file ready to be sent, you can read the Google Drive API documentation to send a POST request with the file attached as data in the request body.

Just select POST as the request method in the interface you took a screenshot of.

To do experiments and learn about how a file upload works with a POST request, I suggest you try to make the request manually with Postman before automating it and read this and maybe this.

Drarig29
  • 1,902
  • 1
  • 19
  • 42