Plugins
Templates

Google Drive (Service Acc.) Plugin

Link to plugin page: https://zeroqode.com/plugin/complete-google-drive-service-acc-1528978032696x958624210411847700

Introduction

Push files to Google Drive using a Service Account both as Base64 or File Type. The easiest way to allow your app to move data on its own.

NOTE: This is the JSON WEB Token authentication version, users will access the Service Account Google Drive.

For the information on how to obtain Service Account Keys for a Service Acc. Plugin, please read here: https://docs.zeroqode.com/obtaining-google-service-account-keys

All pushed files are stored in Google Service account and can be retrived only through the API (for instance- Get Files). The files are NOT stored in Google Drive itself.

Service accounts, types of service accounts, and the IAM roles that are available to service accounts please find here: https://cloud.google.com/iam/docs/service-accounts

A shared drive is an organizational structure within Google Drive that lives parallel to My Drive. You can organize an individual file within a shared drive or in My Drive but not both. For more details please visit this page: https://developers.google.com/drive/api/v3/about-files

Prerequisites

For using the plugin you'll need to get the API credentials with JWT for Google Create your development account at: https://console.cloud.google.com/home/dashboard and also enable Google Drive API in console.

Setting up:

a) Iss (account email): [your-account-name]@[google-project-name].iam.gserviceaccount.com

b) Private Key:

-----BEGIN PRIVATE KEY----- HERE YOUR PRIVATE API KEY -----END PRIVATE KEY-----

2) Install the plugin “Google Drive (Service Acc.)” and fill out Iss an Private Key inputs with the information above.

3) Next you can use all the API Calls that plugin provides.

Plugin API Calls:

  1. Search/Get Files - returns files from Google Drive.

  2. Upload a File (base64) - upload a file to Google Drive.

  3. Upload a File - upload a binary file to Google Drive.

  4. Create a File- creates a file / folder to Google Drive.

  5. Give Everyone Permission Write - gives everyone permission change or create files to Google Drive.

  6. Give Everyone Permission Read - gives everyone permission to read files from Google Drive.

  7. Remove Everyone With Link Permission - removes users that have permission to Google Drive files and folders.

  8. Remove Permission Using ID - removes permissions to file using file id and permission id.

  9. Give a User Permission Write - gives to one user permission to write.

  10. Give a User Permission Read - gives to one user permission to read.

  11. Give a User Permission Commenter - give to one user permission to comment.

  12. Update User’s Permission Write - updates one user permission to write.

  13. Update User’s Permission Read - updates one user permission to read.

  14. Delete File - delete a file from Google Drive.

  15. Get File Info - get a file info using file id.

  16. Add File To Folder - adds a file to a folder using file id and folder id.

  17. Remove File From Folder - removes a file from a folder.

  18. Get Image From Drive - return a image from Google Drive using image id.

  19. Rename File - rename a file from Google Drive.

  20. Get Folder Childrens - return a list of files contained in current folder.

  21. Export File - return a file from Google Drive using file id and mimeType, MIME Types can be found here (https://developers.google.com/drive/api/v3/mime-types)

  22. Download File (if file have downloadUrl) - returns file from Google Drive. (https://developers.google.com/drive/api/v3/manage-downloads#downloading_google_documents)

Things to Note:

For file name untitled issue , you'll need to create a workflow of a few steps, both of which are calls found in plugin:

  • Upload File -> (Get File Id result from step 1) -> Rename File.

Changelogs

Update 30.04.2021

  • Added new element 'Drive Uploader'

Demo to preview the settings