Artisan IMG > Google Drive (drive) (e1359d4a-4476-439b-93df-90f5eea806e9)
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 various aspects of the Google suite (such as Google Sheets, Docs, or Calendar) note that permissions for granting access come under the remit of the Google Drive connector.

Simply add a Google Drive connector to your workflow and select the Create permission operation to specify the kind of access you wish to grant your user/s.

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).

  • 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: