Artisan IMG > Google Drive (drive) (e1359d4a-4476-439b-93df-90f5eea806e9)

Google Drive
3.0

Send and retrieve data from Google Drive

Overview
Copy

Get access to files anywhere through secure cloud storage and file backup for your photos, videos, files and more.

API Information
Copy

The Google Drive connector has the following Base URL: https://www.googleapis.com/drive/v3. More information can be found on their main API documentation (v3) site. Details regarding their API limitations can be found here.

Authentication
Copy

Within the builder, click on the Google Drive connector to display the connector properties panel. Select the Auth tab and click on the New authentication button.

In the Tray.io authentication pop-up modal name your authentication in a way that will quickly identify it within a potentially large list. For example whether it is a Sandbox or Production auth, etc.

Consider who/ how many people will need access to this authentication when choosing where to create this authentication ('Personal' vs 'Organisational').

The next page asks you to set the scopes for your authentication. Select these depending on your project needs.

Once you have added these fields to your Tray.io authentication pop-up window click the Create authentication button. 

Your connector authentication setup should now be complete. Please run the simplest operation available to test and make sure you can retrieve data as expected.

Note on Operations usage
Copy

Sharing permissions
Copy

If you wish to share or give people access to different components of the Google suite (such as Google Sheets, Docs, or Calendar), note that permissions for granting access fall under the capabilities of the Google Drive connector. Here’s how you can do it:

Add the Google Drive Connector to Your Workflow Select the 'Create permission' operation to specify the kind of access you wish to grant your user(s).

Set Up Parameters

  • File ID: Enter the ID of the Google file you want to share. You can find the ID in your document's URL. It is the string between /d/ and /edit

    • Consider this is your file's URL: https://docs.google.com/spreadsheets/d/1aBcD1234EfGhIjKlMnOpQrStUvWxYz1234567890/edit

    • The id is the string between /d/ and /edit: 1aBcD1234EfGhIjKlMnOpQrStUvWxYz1234567890

  • Email Message: Optionally, include a message to the recipient.

  • Send Notification Email: Choose whether to send a notification email to the recipient.

  • Transfer Ownership: Decide if you want to transfer ownership of the file.

  • Use Domain Admin Access: Enable this if you are using domain-level admin access.

  • Role: Select the role you want to assign (e.g., Viewer, Commenter, Editor).

  • Grantee Type: Choose the type of grantee:

    • User or Group: Requires an email address for the user or group.

    • Domain: Requires a domain.

    • Anyone: No additional information is required.

  • Allow File Discovery: Choose whether to allow the file to be discoverable.

  • Email Address: Provide the email address of the user or group you are sharing the file with.

List Spreadsheets & Google Drive
Copy

IMPORTANT!: You now need to use the Google Drive connector in conjunction with the Google Sheets connector in order to list all available spreadsheets from within a user's account.

This update effectively breaks all / any previous workflows that were dependent upon this ability within the Google Sheets connector.

Due to security updates from Google we have had to separate the ability to List Spreadsheets from the Google Sheets connector itself.

This operation now resides in the Google Drive connector in its entirety.

If you have a workflow which uses an old version of Google Sheets (one where the List spreadsheets operation is still available) we recommended revising your workflow in one of the following ways to avoid any potential downloading or security issues:

  1. Retrieve multiple sheets: Add a Google Drive connector to an earlier point within your current workflow.

    • Select List spreadsheets from the operations list.

    • Set it up in conjunction with your Google Sheets user.

  2. Retrieve a single sheet: Select via sheet ID

    • Put the Google Sheet ID into the relevant operation field.

Download types
Copy

IMPORTANT!: There is a difference between Download File vs Download Google File.

You must make sure you accurately set / know your file type before selecting a download operation. Incorrect setup will result in a failed workflow run.

Here are some examples of when it is best to use each:

  • Download Google file:

    • To export a Google document for use in other services or programme (such as MS word etc).

    • When downloading a file you can specify the file type. For example you can choose 'rich text' to convert a Word document to rich text format for simple downstream processing in your workflow.

  • Download file:

    • To download a file from your Drive that is in an unrecognised file format. One that Google Drive does not support. It will only need the Google file ID.

Example Usage
Copy

Below is an example of a way in which you could potentially use the Google Drive connector to download a Google Drive file for later use.

The basic logic of the workflow is as follows:

  1. Setup using a manual trigger and use a Google Drive connector to list your files.

  2. Download said file to the current run.

  3. Use the CSV Editor to download the specified file.

Your completed workflow should look similar to this: