Overview

Perform operations on files and folders on Google Drive via the Workflow Automator.


Description

Orchestration apps let you automate repeatable tasks and actions that span across a diverse set of systems and applications using workflows. The list of actions supported for this app include:

File and Folder Management

  1. Get File Or Folder

  2. Create File Or Folder

  3. Update File Or Folder

  4. Delete File Or Folder

  5. Upload Ticket Attachments to Drive

  6. Attach File to Ticket

  7. Attach File to Ticket Note


Permission Management

  1. Get Permission by ID

  2. Create Permission

  3. Update Permission

  4. Delete Permission

App Installation Parameters:

  1. Client Email 

  2. Private Key

  3. Private Key ID

  4. Email ID(The GSuite account email address)

The following two parameters are required for attaching documents to your Freshservice tickets as either a note or directly to a new ticket.

  1. Freshservice Domain - The domain of your Freshservice tenant. Example: demo.freshservice.com

  2. Freshservice API Key - Login to your Freshservice tenant. Click on your profile icon then "Profile Settings" on the right side pane, under "Your API Key" complete the captcha and copy your API key.


Installation Parameters Description:

All app installation parameters are present in the service account credentials (JSON) generated in Prerequisite(A).

 
Prerequisites

A. Create a Service Account:

  1. Open the Service accounts page.

  1. If prompted, select a project, or create a new one.

  1. Click add Create service account.

  2. Under Service account details, fill in the "Name", "ID", and "Description" of the service account, then click Create.

  1. Optional: Under Service account permissions, select the IAM roles to grant to the service account, then click Continue.

  2. Optional: Under Grant users access to this service account, add the users or groups that are allowed to use and manage the service account.

  3. After the service account is created, open the service account, click on "Edit" then click "Add Key" under "Keys", then click "Create New Key".

  1. Then click on "Domain-Wide Delegation" and then tick "Enable G Suite Domain-wide Delegation".  

Your new public/private key pair is generated and downloaded to your machine; it serves as the only copy of the private key. You are responsible for storing it securely. If you lose this key pair, you will need to generate a new one.

 

B. Enable API & Services:

  1. Go to https://console.developers.google.com/

  2. Click on Enable API & Services

  1. Search for Google Drive API

  1. Enable Google Drive API

C. Assign Oauth Scopes for Google API:

  1. Go to the Admin console. From the Admin console, go to Home > Security > API controls.


  1. Under Domain wide delegation, click Manage Domain Wide Delegation.


  1. On the Manage domain wide delegation page, click Add new.


  1. Enter the client ID of the service account or OAuth2 client ID of the app. Under OAuth Scope, add each scope that the application can access, as mentioned in Prerequisites(D) below.

  1. Click Authorize.


D. Oauth Scopes

  1. https://www.googleapis.com/auth/drive

  2. https://www.googleapis.com/auth/drive.file

  3. https://www.googleapis.com/auth/drive.readonly


Usecases
Now that you've successfully installed the Google Drive orchestration app, please have a look at the sample use case below to show how the app can be used efficiently.