Google Drive In

<< Click to Display Table of Contents >>

Navigation:  Nodes > Input > Downloads >

Google Drive In

 

Purpose

 

This node download a Google Drive folder. You can watch a video tutorial here: https://www.youtube.com/watch?v=WtHOokfMVco

Before you can use this node you will need to get some credentials from Google. It only needs to be done one time, but the node will not work until then:

Warning: After following the below procedure and saving the workflows file, the new

.mwf file will contain your credentials and long term token.  Anyone having access to the  .mwf file can use the associated google services of your account.

For more safety or if not sure, we recommend creating a dedicated google account for your workflows, rather than using personal accounts.

 

How to create access credentials to your Google Drive (if not having them yet):

 

We can't go into much detail (screenshots and so on) because Google change this procedure quite often, but basically it works as follows. Once you have a Google Drive:

1 - Obtain Google OAuth 2.0 cloud credentials for your project. In general your Google cloud credentials are managed in the google cloud console in this web page:

https://console.cloud.google.com/apis/credentials/oauthclient

 

If you have never used the google console you will need to use the Create new project menu to create a new project (as a project name, for example name it "Mistika Workflows").

 

Having your project selected, go to Enable APIS and Services and select the google resources you want to give access to Mistika Workflows (YouTube API, google drive API, Gmail,...), and click Enable on each one.

 

2 - Then go to Credentials and:

 

- Configure consent screen: Follow Google instructions to select if you want internal or external access from your organization. Then fill the form with your own email (both the support email and developer email).  And for the app name just type Mistika Workflows. At the date of this document the rest of the fields are optional and can be left by default. When it is done press Save and continue.

 

- Credentials: After the above steps, go to Credentials->Create Credentials -> Oauth client ID and select ApplicationType = Desktop App, Name = Mistika Workflows. Then click Create. By doing that you will get Client ID and Client Secret credentials that you can then use in this node. Click Save to confirm and exit.

 

 

3 -  Once in Mistika Workflows, put the credentials in the node properties Client ID / Client Secret, you need to authenticate a first time. The Authenticate action is available in the contextual menu of the node (right click on the node -> authenticate).

 

If successfully done an "authentication successful"  or "The authentication flow has completed" message will appear.  This means the node is ready to use (depending on the node more properties may appear in the properties panel for additional configuration of your Google resource).

 

Each node can have the same credentials or be different to access different cloud services and resources.

 

An easy way to configure the authentication credentials is to store them in the Workflows -> Workflows Credentials Manager, which permits to store credentials and re-utilize them later by simply selecting their name in the node contextual menu (right click on the node) -> Credentials list.

 

 

Outputs

 

Out: To pass downloaded files to other nodes.

 

Standard properties

Object Name

Color

Bypass

Lock

Name Convention

 

Authentication standard properties

refreshToken

 

Python standard properties

code

Schema name

 

Node specific properties

 

 

Folder ID: The ID of the Google Drive folder to download. To get the ID, navigate to your Google drive folder manually and then copy/paste the last part of the url to this property (the string after the last "/" character of the url).

 

Example. If the url in your browser is this:

 

https://drive.google.com/drive/u/0/folders/1hifq1yft2Gqu86uqasdaV8BCFkhEwlis0

 

Then copy/paste this string: 1hifq1yft2Gqu86uqasdaV8BCFkhEwlis0

 

Local path: Local directory to store the downloaded files

 

Recursive: Also download subfolders recursively.

 

Delete After Download: If the download is successful, delete the downloaded files from Google Drive. When this option is enabled, an additional confirmation field Are you Sure? is displayed to prevent accidental deletions.

 

Client ID, Client Secret: Access credentials (see introdcution above).

 

 

Developer reference (Python - GoogleDriveIn.[Property ID], API Rest - node/GoogleDriveIn/property/[Property ID])

 

Property Label

Property ID

Folder ID

folderId

Local Path

localPath

Recursive

recursive

Delete After Download

deleteAfterDownload

Are You Sure

areYouSure

Client ID

clientId

Client Secret

clientSecret

Refresh Token

refreshToken