Skip to main content
Skip table of contents

Google Drive Connector

Google Drive ConnectorConnects to the Google Drive cloud service and provides cloud storage data management capabilities.

Google Drive allows to have multiple objects with the same name. Currently, when executing operations that refer to multiple existing objects, an error message is issued and the operation is not executed.


Properties

Operation

Operation executed by the adapter

Possible values:

  • CopyFile: Copies an existing file within the Google Drive account
  • CreateComment: Creates a comment
  • CreateFolder: Creates a new folder in the Google Drive account
  • DeleteFolder: Deletes an already existing folder
  • DeleteFile: Deletes an already existing file
  • ExtractArchiveToFolder: Extracts files inside a ZIP folder to a folder
  • GetFileContent: Retrieves the contents of an already existing document
  • GetFileMetadata: Gets the metadata of a file
  • ListFiles: Lists all files and folders of the root directory
  • ListFilesInFolder: Lists all files and folders inside a specified folder
  • ReadComments: Reads out already existing comments
  • RevokePermission: Revokes permission according to the parameter configuration.
  • SetPermission: Creates or updates permissions according to the parameter configuration.
  • UpdateFile: Updates the content or the name of a file
  • UpdateFolderName: Updates the name of an already existing folder
  • UploadFile: Uploads a file to the Google Drive account.

Parameters

Adapter

Main class of the adapter (do not change!)

Possible values: de.softproject.integration.adapter.google.cloud.drive.GoogleCloudDriveAdapterMain class (default)

serviceAccountFile

Path of the service account file for authentication

Possible values: String with the path of the service account file.

folderPath

Folder path where the extracted file will be placed

  • If the path is not specified, the path of the root directory is used.
  • This parameter is used for ListFilesInFolder, DeleteFile, GetFileContent and GetFileMetadata operations.

Possible values: String with the folder path; The path specification must end with a slash /.

sourcePath

Path of the source file

This parameter is used for UploadFile, UpdateFile, CopyFile and ExtractArchiveToFolder operations.

Possible values: string with the path to the source file

destinationPath

Path to the destination folder or file

This parameter is used for CopyFile, UploadFile, UpdateFile and ExtractArchiveToFolder operations.

Possible values: String with the path to the destination file or folder; The path specification must end with a slash /.

filename

Filename - in some cases the parameter is used to set or change the filename.

This parameter is used for UploadFile, DeleteFile, GetFileContent, GetFileMetadata, UpdateFile and CopyFile  operations.

Possible values: String with the file name

folderName

Folder name

  • For the ExtractArchiveToFolder operation, the parameter is used to create a new folder where the files are extracted from the ZIP folder.
  • The parameter is also used for the  CreateFolder, UpdateFolderName and DeleteFolderoperations.

Possible values: String with the folder name

comment

Comment

This parameter is used for create and read operations.

Possible values: String with the comment

overwrite

Specify whether existing files are to be overwritten

This parameter is used for all create, copy or update operations except for the CreateFolder operation. For false a message is output if the file/folder already exists.

Possible values: Boolean value true or false.

scope

Scope of the authorization

This parameter is used for the SetPermission operation.

Possible values:

  • DOMAIN
  • GROUP
  • USER
  • ANYONE
role

Role of authorization

This parameter is used for the SetPermission operation.

Possible values:

  • FILE_ORGANIZER
  • READER
  • OWNER
  • WRITER
  • COMMENTER
account

Domain or e-mail address of the user or group

This parameter is used for SetPermission and RevokePermission operations.

Possible values: String with the domain or e-mail address

Status values

1

The adapter operation was executed successfully

-1An error occurred while executing the adapter

Input

The adapter is managed via parameters. However, for some operations such as ExtractArchiveToFolder, UploadFile or UpdateFile, an input can be passed that represents the content to be uploaded or updated. If no input is passed for these operations, the sourcePath parameter is used.

Output

The adapter outputs the following structure when a list operation is used:

Output for list operations

XML
<?xml version="1.0" encoding="UTF-8"?>
<Files>
       <File FullName="X4-ADK.pdf" id="1_nNnJVwCyNXrFWiGDok1GNKmdZeAcXK7"/>
       <File FullName="X4-Activities.pdf" id="1soJS2I4JgG4pNxypbI9MnTKSON1iLWcI"/>
       <File FullName="X4-Release-Notes.pdf" id="1C8dh8I6r2LDsPP3avdkYNIVLCGmvf54T"/>
       <File FullName="X4-ESB.pdf" id="1lPatZJT2yxI1IdfzlYy8hINO56TOhCdC"/>
       <File FullName="X4-BPM.pdf" id="1R5_mJ4x6_qcPZhrnaP-z_zoFd6kJJmAn"/>
       <File FullName="X4-Administration-Guide.pdf" id="1di3dhqUe3bLXx8OWQqtqcBLcIeXPS4N-"/>
</Files>

The following information is output for the GetFileMetadata operation:

Output for the GetFileMetadata operation

XML
<?xml version="1.0" encoding="UTF-8"?>
<File FullName="X4-Release-Notes-Comment.pdf" Id="18upYSTk8pkGMm8YVT46LHa9R9myYzf7I">
    <Kind>drive#file</Kind>
    <Parents>
        <Id>0AOvK1n-M5IHmUk9PVA</Id>
    </Parents>
    <Permissions>
        <Permission>
            <Id>03478937985708787222</Id>
            <Account>service-account@shaped-fx-259808.iam.gserviceaccount.com</Account>
            <Scope>user</Scope>
            <Role>owner</Role>
        </Permission>
    </Permissions>
    <Created>2020-01-07T10:45:33.338</Created>
    <Size>4376271</Size>
</File>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.