Connection - Google Drive
The Google Drive Connection stores the sign-in and security settings that these Tasks and Triggers use to connect to Google Drive:
- Cloud - Upload file(s)
- Cloud - Download file(s)
- Cloud - List item(s)
- Cloud - List folder(s)
- Cloud - Create folder
- Cloud - Delete item(s)
- Cloud - Copy/move item(s)
- Cloud - Sync file(s)
- The Cloud file Trigger
Use it to transfer files between Google Drive and a local folder, or between Google Drive and another cloud service.
Common settings

The Common settings and Proxy tabs are the same for every Connection type that has them; see Common settings and Proxy.
Test asks the Server to connect with the stored sign-in and read the root folder of the Google Drive.
Main settings

These fields are on Connection settings -> Main settings.
App Key
The client ID of the OAuth client that you create in the Google Cloud console. Required.
App Secret
The client secret of that OAuth client.
Redirect Url
The address that Google sends the sign-in result to. Default: "http://localhost:9999". Add the same address as an authorized redirect URI of the OAuth client.
Auto-accept server certificates
Selected by default.
Google Drive Connections accept any server certificate, whether or not Auto-accept server certificates is selected. The Server does not check the server certificate when it connects to Google, so it cannot tell the real server from another server that answers at the same address. Connect to Google only over a network path that you trust.
Create an account
Opens the APIs page of the Google Cloud console.
Authenticate
Starts the Google sign-in. See Authentication and token expiry.
How to create a Google Drive Connection
To create a Google Drive Connection, complete the following steps:
-
Open the Google Cloud console at https://console.cloud.google.com/apis, or click Create an account.
-
Select or create a project.
-
Enable the Google Drive API for the project.
-
Set up the OAuth consent screen of the project.
-
Publish the app, or select the "Internal" user type if the Google accounts belong to your Google Workspace organization. While an app with the "External" user type is in "Testing" status, Google ends its sign-ins after 7 days, and Jobs that use the Connection then fail.
-
Create an OAuth client ID of the type "Web application".
-
Add the value of Redirect Url, by default "http://localhost:9999", as an authorized redirect URI of the client.
-
Copy the client ID into App Key.
-
Copy the client secret into App Secret.
-
Click Authenticate.
-
Sign in with the Google account.

-
Allow VisualCron to access the Google Drive of the account.
-
Click OK to save the Connection.
-
Click Test on the Common settings tab.
The test reports that it was successful. You can also browse the files of the Connection in the Connection Explorer.

Authentication and token expiry
- Authenticate runs on the computer where the Client runs. The browser opens there, and the Client listens for the sign-in result on the port of Redirect Url, so that port must be free on that computer
- After the sign-in, the Connection stores the refresh token encrypted, and the Server uses it at run time
- When Google no longer accepts the refresh token, the Server marks the Connection as expired, and the Client shows the message "Connection session expired". Open the Connection and click Authenticate again
Proxy

The Cloud Tasks and the Cloud file Trigger send their Google Drive requests through the proxy on this tab.