Salesforce

Google Drive - Methods (Magic xpi 4.5)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Google Drive - Methods (Magic xpi 4.5)

Use the following methods to configure the Google Drive component:

The table below lists the methods and parameters that can be used. Parameters in bold are mandatory.

Name

Parameters

Description

Create Folder lets you either specify the parent folder path or specify a specific folder ID as its root folder. If neither of the two is being used, the folder will be created under the root.

Folder Name

The name of the folder that you want to create.

Click to open the Expression Editor, and then enter the required name.

Locate Parent By

Indicates how you want to locate the parent. Select one of the following from the drop-down list:

  • Key (default)

  • Path

Parent Folder Path

The parent folder's path. Starting from the root folder, the path should be in the following format:

/FolderA/FolderB/…..

Click to open the Expression Editor, and then enter the required path.

This parameter is available only if the Locate Parent By parameter is set to Path.

Parent Folder Key

The parent folder's key.

Click to open the Expression Editor, and then enter the required key.

This parameter is available only if the Locate Parent By parameter is set to Key.

Folder Key

Returns the created folder key.

Click to open the Variables List. Select a variable where the created folder key is returned, and then click Select.

Error Code

Returns a Google Drive error code.

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Delete deletes a document or a folder based on the document ID.

Key

The document or folder key that you want to delete.

Click to open the Expression Editor, and then enter the required document or folder key.

Delete Permanently

Determines whether you want to delete a file permanently without first moving it to the Trash folder. Select one of the following from the drop-down list:

  • No (default)

  • Yes

For use with: 4.1 and above

Error Code

Returns a Google Drive error code.

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Download Item exports the document to a specified folder. Each document type can be exported in several formats. The document is exported in the selected format, which in turn is based on the document type.

Key

The document or folder key that you want to use to access the document feed.

Click to open the Expression Editor, and then enter the required document or folder key.

Type

The type of item that you want to download. Select one of the following from the drop-down list:

  • Default

  • Document

  • Spreadsheet

  • Presentation

  • Drawing

Note:

When the Type parameter is set to Default, and the file's MIME type is a Google Drive MIME type (https://developers.google.com/drive/web/mime-types), the files are downloaded as follows:

  • If the MIME type is Documents, the file is downloaded as docx.

  • If the MIME type is Spreadsheet, the file is downloaded as xlsx.

  • If the MIME type is Presentation, the file is downloaded as pptx.

  • If the MIME type is Drawing, the file is downloaded as jpeg.

However, when the Type parameter is set to Default, and the MIME type is not a Google Drive one, the files are downloaded "as is". This means that the file is saved with the same extension that appears in the file's mimeType property.

Format

The format in which the item is to be downloaded. The available options are governed by the Type parameter.

If you select Document as the Type parameter, the available options are:

  • docx

  • odt

  • pdf

  • txt

  • rtf

  • html

If you select Spreadsheet as the Type parameter, the available options are:

  • xlsx

  • pdf

  • csv

If you select Presentation as the Type parameter, the available options are:

  • pdf

  • pptx

  • txt

If you select Drawing as the Type parameter, the available options are:

  • svg

  • jpg

  • png

  • pdf

This parameter is not available if the Type parameter is set to Default.

Note:

TSV and ODS files can be uploaded using the Upload Item method and then converted to a Google Drive spreadsheet. However, you cannot download a file in ODS and TSV formats from Google Drive if the Download Item method’s Type parameter is set to Spreadsheet. If you want to use an ODS or TSV file, set the Download Item method's Type parameter to Default.

Destination Folder

The folder path where the items will be downloaded. If this folder does not exist, it will be created automatically.

Click to open the Expression Editor, and then enter the required folder path.

Overwrite File

Governs whether the destination file will be overwritten. Select one of the following from the drop-down list:

  • Yes (default)

  • No

Error Code

Returns a Google Drive error code.

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Move moves documents and folders under a specific folder path or ID.

Key

The key of the document or folder that you want to move.

Click to open the Expression Editor, and then enter the required document or folder.

Locate Source Parent By

Indicates how you want to locate the source parent. Select one of the following from the drop-down list:

  • Key (default)

  • Path

Source Parent Folder Key

The key of the source parent folder from which you want to move the documents and folders.

Click to open the Expression Editor, and then enter the required key.

If this parameter is left empty, the documents and folders will be moved under the root folder.

This parameter is available only if the Locate Source Parent By parameter is set to Key.

Source Parent Folder Path

The path of the source parent folder from which you want to move the documents and folders. Starting from the root folder, the path should be in the following format:

FolderA/FolderB/…..

Click to open the Expression Editor, and then enter the required path.

If this parameter is left empty, the documents and folders will be moved under the root folder.

This parameter is available only if the Locate Source Parent By parameter is set to Path.

Locate Destination Parent By

Indicates how you want to locate the destination parent. Select one of the following from the drop-down list:

  • Key (default)

  • Path

Destination Parent Folder Key

The key of the destination parent folder to which you want to move the documents and folders.

Click to open the Expression Editor, and then enter the required key.

If this parameter is left empty, the documents and folders will be moved under the root folder.

This parameter is available only if the Locate Destination Parent By parameter is set to Key.

Destination Parent Folder Path

The path of the destination parent folder to which you want to move the documents and folders. Starting from the root folder, the path should be in the following format:

FolderA/FolderB/…..

Click to open the Expression Editor, and then enter the required path.

If this parameter is left empty, the documents and folders will be moved under the root folder.

This parameter is available only if the Locate Destination Parent By parameter is set to Path.

Error Code

Returns a Google Drive error code.

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Query Item List looks for a list of documents based on various search parameters.

Name

The item name that you want to search for.

Click to open the Expression Editor, and then enter the required name.

Name Exact

Determines whether the item name given in the Name parameter should be taken as an exact string. Therefore, this parameter is only relevant if you entered a value in the Name parameter.

Select one of the following from the drop-down list:

  • No (default)

  • Yes

Text Search In Contents

Searches for specific text in the contents of the document. This applies to whole words only. Substrings are not included in the search results.

Click to open the Expression Editor, and then enter the required text.

Item Type

The type of item that you want to query. Select one of the following from the drop-down list:

  • All (default)

  • Documents

  • Folder

  • PDF

  • Presentation

  • Spreadsheet

  • Drawing

Item Status

The status of the item that you want to query. Select one of the following from the drop-down list:

  • All (default)

  • Starred

  • Trashed

  • Hidden

Show Folders

Determines whether the query should return folders as well as documents.

  • No (default)

  • Yes

Show Deleted

Determines whether the query should also return deleted documents. Select one of the following from the drop-down list:

  • No (default)

  • Yes

In Folder

The file path of the folder that holds the items that you want to query.

Click to open the Expression Editor, and then enter the required file path. You should use "/" as the path separator.

Opened Since

To search for items that were opened between two specific times, you can specify the beginning of the time period you want to search.

Click to open the Expression Editor, and then enter the required time, according to the RFC 3339 timestamp format. For example, 2005-08-09T09:57:00-08:00.

Opened Until

To search for items that were opened between two specific times, you can specify the end of the time period you want to search.

Click to open the Expression Editor, and then enter the required time, according to the RFC 3339 timestamp format. For example, 2005-08-09T09:57:00-08:00.

Owner

Searches for items that have a specific owner.

Click to open the Expression Editor, and then enter the owner's email ID.

Collaborators

Searches for documents which can be written to by specific users.

Click to open the Expression Editor, and then enter either a single email ID or a comma separated list of email IDs.

Viewers

Searches for documents which can be read by specific users.

Click to open the Expression Editor, and then enter either a single email ID or a comma separated list of email IDs.

Items List

Returns an XML containing a list of items.

Click to open the Variables List. Select a BLOB variable where the XML is returned, and then click Select.

Error Code

Returns a Google Drive error code.

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Retrieve Item List retrieves a list of all the currently authenticated user's items.

Items List

Returns an XML containing a list of items and their details.

Click to open the Variables List. Select a BLOB variable where the XML is returned, and then click Select.

Error Code

Returns a Google Drive error code.

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Set Item Access Control determines the user permission for the item.

Key

The key of the item whose access control permissions you want to set.

Click to open the Expression Editor, and then enter the required key.

User

The user for whom you are granting access control permission.

Click to open the Expression Editor, and then enter the required user name.

Rights

Determines the type of access rights that you want to give to a specific user. Select one of the following from the drop-down list:

  • Owner (default)

  • Collaborator

  • Viewer

  • No Access

Note:

An item must have an owner, and there can be only one owner for an item.

Error Code

Returns a Google Drive error code.

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Update Item updates the item's metadata properties and content.

Key

The key of an existing item that you want to update.

Click to open the Expression Editor, and then enter the required key.

Name

The new name of the item that you want to update. This parameter renames the current item.

Click to open the Expression Editor, and then enter the required name.

Starred

Determines whether the item will be marked as Starred. Select one of the following from the drop-down list:

  • No Change (default)

  • Yes

  • No

Hidden

Determines whether the item will be marked as Hidden. Select one of the following from the drop-down list:

  • No Change (default)

  • Yes

  • No

File Path

The full path of the file whose content will overwrite the current document's content.

Click to open the Expression Editor, and then enter the required file path.

Error Code

Returns a Google Drive error code.

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Upload Item uploads an item to Google Drive.

Name

An optional item name.

Click to open the Expression Editor, and then enter the required name. If you leave this field empty, the item name will be the item file name.

Path

The full path of the item that you want to upload.

Click to open the Expression Editor, and then enter the required path.

Locate Parent By

Determines how you want to locate the parent folder. Select one of the following from the drop-down list:

  • Key (default)

  • Path

For use with: 4.1 and above

Parent Folder Key

The key of the parent folder under which you want to upload the documents and folders.

Click to open the Expression Editor, and then enter the required parent folder key.

This parameter is available only if the Locate Parent By parameter is set to Key.

For use with: 4.1 and above

Parent Folder Path

The path of the folder where you want to upload the item. Starting from the root folder, the path should be in the following format:

FolderA/FolderB/…..

Click to open the Expression Editor, and then enter the required path. If the folder exists, the item will be uploaded to it. If the folder does not exist, an error will be returned.

This parameter is available only if the Locate Parent By parameter is set to Path.

For use with: 4.1 and above

Convert File

Determines whether an item will be uploaded with its original extension or whether it will be converted to a Google Drive type. Select one of the following from the drop-down list:

  • No (default)

  • Yes

Note:

The MimeTypes.properties file (located in the Runtime\ifclib\googledocuments folder) lists all MIME types that the Google Drive connector supports. This modifiable file is loaded dynamically by the server.

For use with: 4.1 and above

Key

Returns the uploaded item key.

Click to open the Variables List. Select a variable where the uploaded item key is returned, and then click Select.

Error Code

Returns a Google Drive error code.

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Reference
Attachment 
Attachment