Skip to content

Adding and Configuring Google Drive module#

Add the Google Drive node to the workflow as described for the Doc2StatusTrigger

Select OAuth2 for the Authentication method

Doc2AppStatusTrigger Sample

Click Add New for the Credentials for Google, it will open a dialog as shown below.

Doc2AppStatusTrigger Sample

Copy the OAuth Redirect URL and use this to create new google OAuth2.0 app as shown in the tutorial below.

Setting up OAuth 2.0

OAuth 2.0 (Screen 1)

OAuth 2.0 (Screen 2)

OAuth 2.0 (Screen 3)

OAuth 2.0 (Screen 4)

Copy the Client ID and Client Secret for newly created oauth client and add it to the Google Drive module connection screen as show above

Select File for the Resource option and Upload as operation.

For the file content we will send the full extracted JSON returned from previous module.

To convert the json response to string we are going to use below expression for file content

{{JSON.stringify($node["Status Trigger"].json)}}

For the filename we will extract the filename from json returned from previous module.

{{$node["Status Trigger"].json["filename"].replace('.pdf','.json') }}

Click Execute button and you should see output like below.

Google Drive Node Success

This means that document has been uploaded to Google Drive successfully.