User Guide
  • Introduction
  • Overview
    • About 4WS.Platform
      • Architecture
      • Enterprise Edition
      • Tech specs and requirements
      • Warp SDK
    • Creating a web application
  • Core features
    • Tables
    • SqlTool
    • Definition of Data models and Relations
      • Relations
      • Reverse Engineering
      • Custom Fields
    • Defining business components
      • What are business components
      • Business components to fill-in panels
      • Creating business components
        • By a datastore entity
        • By a MongoDB collection
      • Defining Custom Java Business component
    • Defining the UI
      • App Designer
        • App Designer Menu
        • Definition of additional data sources
        • Panel containers and layouts
          • Tab panel
          • Alternative panel
          • Accordion panel
          • Vertical orientation panel
          • Horizontal orientation panel
          • Columns panel
          • Table panel
          • Generic panel
          • Responsive panel
        • Window content
          • Grid Panel
          • Form Panel
          • Filter Panel
          • Tree Panel
          • Google Map Panel
          • Preview Panel (old Image panel)
          • Tree + Grid Panel
          • Image Gallery
        • Windows list
        • Panel definition
          • Columns properties
          • Controls properties
          • Filter properties
          • Supported components
        • Variables
        • Code selectors
          • When not to use a dynamic combo-box
        • Smart Filter and Advanced Filter
        • Multi Value Combobox Filter
        • Multi Value Tree Filter
        • Buttons
        • Translations
          • Translations about GUI components and internationalization settings
          • Data coming from database
          • Custom code and translations
        • Application Menu
        • Bulk import binded to a grid
        • Range Date Filter
      • Web Interpreter
        • Grid components
        • Detail forms
        • Other components
        • Other features
          • Chat
        • Global variables
          • Client-side global variables
          • Server global variables
        • Forgot Password
    • Working with users and roles
      • Rule for roles
      • Permissions Administrator
    • Wizard
      • How to add a checkbox grid to select one or more rows
      • How to load a second grid when clicking on a row from the first grid
      • How to load a form when clicking on a row of the grid
      • How to open a window when double clicking on a row of the grid
      • How to open a window with right click on the popup menu
      • How to open a window when pressing a button on the grid toolbar
      • How to load a grid after loading a form
      • How to open a window when pressing a button on the form toolbar
      • How to load a grid when clicking on a tree node
      • How to load a form when clicking on a tree node
    • Defining events
      • Panel events
      • Column events
      • Control events
      • Filter events
      • Timer events
      • Start-End event
    • Server-side Javascript & Web Service
      • Server-side Javascript
      • Grid component filled by a server-side JS
      • Detail component filled by a server-side JS
      • How to define a server-side JavaScript action
      • Web service
  • Setting up the environment
    • How to install
    • Application parameters
    • Global parameters
  • Modules
    • Reports & Charts
      • Jasper Report + iReport
      • Online report
      • Docx templating
      • Charts
      • Pivot Grid
      • Multidimensional pivot grid
      • Data Export from SQL query
    • SSO
      • Identity management in Platform
        • Identity management on the internal Platform database
        • Identity management based on Google SSO
      • LDAP
        • LDAP support
        • Identity management based on LDAP and database
        • Identity management based on an embedded LDAP server used by Alfresco and or Activiti
        • Identity management based on a remote LDAP server to connect to Platform on the cloud
        • Connecting an LDAP server to Activiti BPM
        • Connecting an LDAP server to Alfresco ECM
      • Google SSO
        • Google SSO
        • Google OAuth2
        • Identity management based on Google SSO
      • Custom SSO
      • Firebase
    • Mobile
      • Mobile introduction
      • Offline vs Online
        • Server side features
        • Server side functionalities
        • Server side Platform features
        • Mobile app features
      • Mobile side specifics
        • Customizations
          • Custom theme editor
        • App Menu
        • Window content
          • Detail scrollable form
          • Scrollable paginated grid
          • Constraint layout
          • Constraint panel
          • Collection grid view
          • Preview panel (mobile)
        • Form Controls
      • Reference guide
      • Cleaning up data
      • How to
      • App deployment
        • App deployment for the iOS platform
        • App deployment for the Android platform
      • Style properties
      • Appendix : Synchronization flow
      • Translations
    • GSuite
      • Introduction
      • Client-side integration
      • GMail
      • Calendar
      • Drive
      • Contacts
    • Google Cloud Platform
      • Datastore
        • Google Datastore Introduction
        • How to create Datastore entities
      • Google Cloud Storage
    • Scheduler
      • Scheduler Introduction
      • Process settings
        • How to define a sequence of consecutive processes
        • How to define a Custom Java Business component
        • How to define a Grid Data Import
        • How to define a server-side Javascript action
      • Email notifications
      • Process executions
      • Manually start a scheduled process
      • Process input parameters
    • Queue Manager
    • Log & Analysis
      • Application Log
      • Log statistics
      • App analyzer
      • Table log
      • Threads
      • Sessions and heap memory
      • Heap memory analysis
      • Access Log
      • Datastore statistics
      • Total monthly costs with Google Datastore
      • Service Monitoring
        • Introduction
        • Defining a service to monitor
        • Notifications setup
        • Events automatically managed by Platform
        • Remote Platform servers
        • Knowledge base
        • Adding log programatically
        • Searching for logged data
        • Use cases
    • File Management
    • Export and Import of Metadata
      • Application Metadata Management
    • Trigger writing operations
    • Audit
    • BPM
      • BPMN Introduction
      • BPMN main parts
      • Activiti Setup
      • Platform integration
        • Processes
        • Models
        • Process instances
        • To-do list
        • Process history
      • Process Web Modeler
        • Model Creation
          • Start-End Event
          • Gateways
        • Supported objects
        • Start tasks and user tasks
        • Form properties
          • Important notes
          • Property types
        • Service tasks
          • Web service
          • SQL Query
          • SQL statement
        • Mail task
        • Script task
          • Example : how to get a value previously read from a SQL query
          • Example : how to get the current process instance id
        • Timer events
        • Subprocess and Call Activiti
      • Utility methods available in Platform
        • How to start a process from a JavaScript action
        • How to complete a user task from a JavaScript action
      • An example
        • Processes
        • Instances
        • Activities
        • History
    • Embedded CMS
    • ECM
      • Alfresco
        • Alfresco Introduction
        • Integration between 4WS.Platform and Alfresco
          • Integration at GUI level
          • Integration at model level
          • Integration at authentication and authorizations level
          • Additional features
        • How to use 4WS.Platform and Alfresco together
          • Set the same Identity Management system
          • Define document types and aspects in Alfresco
          • Import the document types and aspects definitions in 4WS.Platform
          • Define document types and aspects in 4WS.Platform
          • Reverse engineering of document types or aspects
          • Definition of business components to fill-in panels
          • Definition of the GUI
          • Additional server-side services
        • Requirements
        • Current limits in 4WS.Platform - Alfresco integration
      • Archiflow
        • Setup
        • Archiflow artifacts
        • How to
    • Lotus Notes Migration Tool
    • NoSQL databases
      • MongoDB
        • MongoDB Introduction
        • Setting up the environment
        • How to create collections
        • How to create business components
        • How to create windows filled with data coming from MongoDB collections
        • Design rules
      • Google Datastore
        • Google Datastore Introduction
        • Setting up the environment
        • How to create entities
        • How to create business components
        • How to create windows filled with data coming from Datastore entities
        • Design rules
    • TensorFlow
    • Web Page Development
      • Pure Web Page Development
      • Google Material Design development
      • Appendix A - a complete example without any lib
      • Appendix B - a complete example with Google MD
    • Jira Integration
    • Platform for GAE
    • SQL errors management
    • Multidimensional pivot grid
    • Quality
      • Automated Web Service Testing
      • Automated unit testing
      • Source code static analysis using ESlint
      • Source code static analysis using SonarQube
  • Troubleshootings
  • Best practises
    • Database design
    • Database maintenance
    • Creating a Web app : common use cases
    • Creating a mobile app : common use cases
Powered by GitBook
On this page
  • Get information about a file stored in Google Drive
  • Syntax
  • Details
  • Example
  • Upload a file in Google Drive from the server file system
  • Syntax
  • Details
  • Example
  • Update a file in Google Drive
  • Syntax
  • Details
  • Example
  • Upload a file in Google Drive
  • Syntax
  • Details
  • Move a file or folder in a single folder
  • Syntax
  • Details
  • Example
  • Move a file or folder
  • Syntax
  • Details
  • Example
  • Modify the parents of a file or folder
  • Syntax
  • Details
  • Example
  • Delete a file or folder from Google Drive
  • Syntax
  • Details
  • Example
  • Recover a file or folder from Google Drive trash
  • Syntax
  • Details
  • Example
  • Return the URL to open a file from Google Drive
  • Syntax
  • Details
  • Return the URL to download a file from Google Drive
  • Syntax
  • Details
  • Get the stored versions of the given file
  • Syntax
  • Details
  • Create a folder in Google Drive with the specified parents and optional description
  • Syntax
  • Details
  • Return a list of ids of files/folder that are children of the specified folder
  • Syntax
  • Details
  • Return a list of files/folder that are children of the specified folder
  • Syntax
  • Details
  • Set the permissions for a file/folder
  • Syntax
  • Details
  • Set additional attributes of a file/folder
  • Syntax
  • Details
  • Tree duplication
  • Syntax
  • Details
  • Tree permissions
  • Syntax
  • Details
  • Return the value of a property for the specified file and visibility
  • Syntax
  • Details
  • Add property for the specified file and visibility
  • Syntax
  • Details
  • Patches a property for the specified file and visibility
  • Syntax
  • Details
  • Patches a property for the specified file
  • Syntax
  • Details
  • Update property of a file in Google Drive
  • Syntax
  • Details
  • Remove permissions of file
  • Syntax
  • Details

Was this helpful?

  1. Modules
  2. GSuite

Drive

With this integration, developers can automate the upload, download, update and deletion of files in the user’s Google Drive space. This feature is not intended for Google Drive UI substitution, but for basic and automatic operations and processes. NOTE: currently the Google Drive APIs v2 are supported (see documentation). In order to use this feature, you have also to define a few parameters in 4WS.Platform:

  • GOOGLE_SERVACC_EMAIL

  • GOOGLE_SERVACC_KEY

to enable the Google Apps integration, and the 4WS.Platform user must be a Google Apps user. 4WS.Platform file model Files and folders are represented in 4WS.Platform by the class org.wag.valueobjects.java.File. Objects of that class are converted to Javascript when used as return values of the server side Javascript actions (see below). The attributes of the class are:

  • String id ;

  • String title ;

  • String description ;

  • Long size ;

  • String mimeType ;

  • String path ;

  • String pathType ;

  • String iconPath ;

  • String iconPathType ;

  • boolean folder ;

Javascript actions These are the available Javascript actions. NOTE: almost every method has two versions. One that uses the current logged user to access Google Drive and one that let to specify the userId to access a different Google Drive account.

Get information about a file stored in Google Drive

Syntax

utils.getGoogleDriveFileInfo(userId, fileId)

utils.getGoogleDriveFileInfo(fileId)

Details

fileId – the id of the file Return value - the Platform file representation (org.wag.valueobjects.java.File).

Example

this example shows how to call the method from a Javascript Server action and get the title of the file. The full list of fields can be found in the Java org.wag.valueobjects.java.File class.

var file = utils.getGoogleDriveFileInfo('');

utils.setReturnValue('{ "name":"' + file.title +'" }');

After this we can use the information obtained. If the return value of the server call is needed on the client side, a Javascript client call can be set up to get the JSON object representing, in this case, the id (the actionId is the id of the Javascript Server action):

var resp = new SyncRequest().send(
   contextPath+"/executeJs?applicationId=<appId>" +
   "&actionId=<actionId>",
   "POST",
   null
);
var file = Ext.decode(resp);
showMessageDialog('Message',Title is ' + file.name, null, true);

Upload a file in Google Drive from the server file system

Syntax

utils.uploadGoogleDriveFileFromFS(userId, fsPath, parentId, deleteFsFile)

utils.uploadAndRenameGoogleDriveFileFromFS(userId, fsPath, parentId, fileName, deleteFsFile)

utils.uploadGoogleDriveFileFromFS(fsPath, parentId, deleteFsFile)

utils.uploadAndRenameGoogleDriveFileFromFS(fsPath, parentId, fileName, deleteFsFile)

Details

fsPath – the full path of the file to upload. This path is in the server where 4WS.Platform is installed. parentId – the id of the Drive folder where the file must be uploaded to. Can be null, in this case the root folder is used. fileName – the new name of the uploaded file. If null the original file name is used. deleteFsFile – true or false. Specifies if the file on file system must be deleted or not after upload to Drive. Return value - the Platform file representation (org.wag.valueobjects.java.File).

Example

This example shows how to call the method from a Javascript Server action and get the file object. The full list of fields can be found in the Java org.wag.valueobjects.java.File class.

var file = utils.uploadGoogleDriveFileFromFS('', null, false);

Update a file in Google Drive

The file source is in the server file system. This creates a new version of the file in Google Drive.

Syntax

utils.updateGoogleDriveFileFromFS(userId, fileId, fsPath, deleteFsFile, newRevision)

utils.updateGoogleDriveFileFromFS(fileId, fsPath, deleteFsFile, newRevision)

Details

fileId – the id of the file to update fsPath – the full path of the file to upload. This path is in the server where 4WS.Platform is installed. deleteFsFile – true or false. Specifies if the file on file system must be deleted or not after upload to Drive. fileName – the new name of the uploaded file. If null the original file name is used. newRevision – true or false. Specifies if a new revision must be created or the file must be overwritten. Return value - the Platform file representation (org.wag.valueobjects.java.File).

Example

This example shows how to call the method from a Javascript Server action and get the file object. The full list of fields can be found in the Java org.wag.valueobjects.java.File class.

var file = utils.updateGoogleDriveFileFromFS('','',false);

utils.setReturnValue('{ "name":"' + file.title +'" }');

Upload a file in Google Drive

In a folder with a specific name, contained in a base folder with a specific id. If the folder with the name does not exist in the base folder, it can be created or not:

Syntax

utils.uploadGoogleDriveFileInNamedFolderFromFS(userId, fsPath, baseFolderId, folderName, createFolderIfNotExists, deleteFsFile)

utils.uploadAndRenameGoogleDriveFileInNamedFolderFromFS(userId, fsPath, baseFolderId, folderName, createFolderIfNotExists, fileName, deleteFsFile)

utils.uploadGoogleDriveFileInNamedFolderFromFS(fsPath, baseFolderId, folderName, createFolderIfNotExists, deleteFsFile)

utils.uploadAndRenameGoogleDriveFileInNamedFolderFromFS(fsPath, baseFolderId, folderName, createFolderIfNotExists, fileName, deleteFsFile)

Details

fsPath – the full path of the file to upload. This path is in the server where 4WS.Platform is installed. baseFolderId – the id of the Drive folder where the named folder must be created. folderName – a name of the folder where the file must be uploaded to. This folder must be in the base folder createFolderIfNotExists – true or false. Whether or not to create the folderName folder if not exists in the base folder fileName – the new name of the uploaded file. If null the original file name is used. deleteFsFile – true or false. Specifies if the file on file system must be deleted or not after upload to Drive. Return value - the Platform file representation (org.wag.valueobjects.java.File).

Move a file or folder in a single folder

If in the destination folder exists a single file with the same title/name of the file to move, different results happen depending on the addToRevision value:

if false, the file is moved under the new single folder and the homonymous file is kept as is. Two files with the same name will be present in the folder. if true, the file is saved as a new history version of the homonymous file in the destination folder, and deleted

Syntax

utils.moveGoogleDriveFile(userId, fileId, newParents,addToRevision)

utils.moveGoogleDriveFile(fileId, newParents,addToRevision)

Details

fileId – the id of the file/folder to move newParents – a comma separated list of folder ids that will become the new parents of the file/folder. addToRevision – true/false. If true the file will be new version of a possible homonymous file in the destination folder. If false two files with the same name will be present in the destination folder.

Example

This example shows how to call the method from a Javascript Server action and get the file object. The full list of fields can be found in the Java File class. var file = utils.moveGoogleDriveFile(‘<file_id>’,'<new_folder_id>’,true); utils.setReturnValue(‘{ “name”:”‘ + file.title +'” }’);

Move a file or folder

You can specify a list of comma separated folder ids to become the parents of the file/folder. The current parents are removed.

Syntax

utils.moveGoogleDriveFile(userId, fileId, newParents)

utils.moveGoogleDriveFile(fileId, newParents)

Details

fileId – the id of the file/folder to move newParents – a comma separated list of folder ids that will become the new parents of the file/folder.

Example

This example shows how to call the method from a Javascript Server action and get the file object. The full list of fields can be found in the Java File class.

var file = utils.moveGoogleDriveFile('&lt;file_id&gt;','&lt;new_folder_id&gt;');

utils.setReturnValue('{ "name":"' + file.title +'" }');

Modify the parents of a file or folder

You can specify a list of comma separated folder ids to add as parents of the file/folder and a list of parents to remove.

Syntax

utils.modifyGoogleDriveFileParents(userId, fileId, parentsToAdd, parentsToRemove)

utils.modifyGoogleDriveFileParents(fileId, parentsToAdd, parentsToRemove)

Details

fileId – the id of the file/folder to patch parentsToAdd – a comma separated list of folder ids that will be added as parents of the file/folder. Can be empty. parentsToAdd – a comma separated list of folder ids that will be removed as parents of the file/folder. Can be empty.

Example

This example shows how to call the method from a Javascript Server action and get the file object. The full list of fields can be found in the Java File class.

var file = utils.moveGoogleDriveFile('&lt;file_id&gt;', '&lt;add_folder_id_1&gt;,&lt;add_folder_id_2&gt;', '&lt;remove_folder_id_1&gt;,&lt;remove_folder_id_2&gt;');
utils.setReturnValue('{ "name":"' + file.title +'" }');

Delete a file or folder from Google Drive

You can specify if move the file in the trash or delete it immediately.

Syntax

utils.deleteGoogleDriveFile(userId, fileId, skipTrash)

utils.deleteGoogleDriveFile(fileId, skipTrash)

Details

fileId – the id of the file to delete skipTrash – true or false. Specifies if the file is deleted immediately or moved to trash.

Example

This example shows how to call the method from a Javascript Server action and get the file object.The full list of fields can be found in the Java org.wag.valueobjects.java.File class.

var file = utils.deleteGoogleDriveFile('',false);

utils.setReturnValue('{ "name":"' + file.title +'" }');

Recover a file or folder from Google Drive trash

Syntax

utils.recoverGoogleDriveFile(userId, fileId)

utils.recoverGoogleDriveFile(fileId)

Details

fileId – the id of the file to restore from trash Return value - the Platform file representation (org.wag.valueobjects.java.File).

Example

this example shows how to call the method from a Javascript Server action and get the file object.The full list of fields can be found in the Java org.wag.valueobjects.java.File class.

var file = utils.recoverGoogleDriveFile('');

utils.setReturnValue('{ "name":"' + file.title +'" }');

Return the URL to open a file from Google Drive

This URL should be opened in a browser and must be used for files in Google Drive format (documents, spreadsheets, presentations, forms and so on).

Syntax

utils.getGoogleDriveFileOpenURL(fileId)

Details

fileId – the id of the file Return value - a string containing the URL

Return the URL to download a file from Google Drive

This must be used for uploaded files (PDF, JPG, PNG, DOCX, XSLX, PPTX, TXT and so on).

Syntax

utils.getGoogleDriveFileDownloadURL(fileId)

Details

fileId – the id of the file Return value - a string containing the URL

Get the stored versions of the given file

For both Google and non Google formats.

Syntax

utils.getGoogleDriveFileRevisions(fileId)

Details

fileId – the id of the file Return value - a list of the Platform representation of the version of a file (List)

Create a folder in Google Drive with the specified parents and optional description

Syntax

utils.createGoogleDriveFolder(userId, folderName, parents, description)

utils.createGoogleDriveFolder(folderName, parents, description)

Details

folderName – the name of the folder parents – a list of ids of parent folders. In general one folder. description – an optional description of the folder Return value - the Platform file representation (org.wag.valueobjects.java.File) having the boolean flag "folder" with true value.

Return a list of ids of files/folder that are children of the specified folder

Syntax

utils.getGoogleDriveFolderContentsIds(userId, folderId, query, trashed)

utils.getGoogleDriveFolderContentsIds(folderId, query, trashed)

Details

folderId – the id of the folder query – an optional query to filter the search (see docs) trashed – true or false. Specify if extact also trashed files/folders. Return value - list of strings

Return a list of files/folder that are children of the specified folder

Syntax

utils.getGoogleDriveFolderContents(userId, folderId, query, trashed)

utils.getGoogleDriveFolderContents(folderId, query, trashed)

Details

folderId – the id of the folder query – an optional query to filter the search (see docs) trashed – true or false. Specify if extact also trashed files/folders. Return value - list of the Platform file representation (org.wag.valueobjects.java.File)

Set the permissions for a file/folder

Syntax

utils.setGoogleDriveFilePermissions(userId, fileId, type, value, role, additionalRoles, sendNotifications, message)

utils.setGoogleDriveFilePermissions(fileId, type, value, role, additionalRoles, sendNotifications, message)

Details

fileId – the id of the file/folder type – the type of sharing, one between “user”, “group”, “domain” or “default” value – the email of the user/group or the domain name role – the role one of “reader”, “writer” or “owner” additionalRoles – optional string, for example “commenter” sendNotifications – true or false. Specify if send the notification to the user/group specified in the value. message – optional message for the notification

Set additional attributes of a file/folder

Syntax

utils.setGoogleDriveFileAttributes(userId, fileId, fileAttributes)

utils.setGoogleDriveFileAttributes(fileId, fileAttributes)

Details

fileId – the id of the file/folder fileAttributes – the attributes as defined in org.wag.valueobjects.java.FileAttributes. Currently: starred, trashed, restricted, viewed, writersCanShare.

Tree duplication

Duplicates the folder sourceFolderId and all its contents in a folder called newFolderName with optional description newFolderDescription under folder destinationFolderId . It is also possible to specify a titlePrefix to prepend to the title of every duplicated resource (files or folders) and whether or not copyPermissions from the original folder to the duplicated forlder.

Syntax

utils.duplicateGoogleDriveFolderAndContents(userId, sourceFolderId, newFolderName, newFolderDescription, destinationFolderId, titlePrefix, copyPermissions)

utils.duplicateGoogleDriveFolderAndContents(sourceFolderId, newFolderName, newFolderDescription, destinationFolderId, titlePrefix, copyPermissions)

Details

sourceFolderId – the id of the original folder newFolderName – the name of the copy of the folder newFolderDescription – optional description for the new folder destinationFolderId – the id of the folder where the copy must be created. Can be "root" for the root drive folder. titlePrefix – a prefix copyPermissions – true or false. Copy the permissions of the original folder in the duplicate folder. Return value - the Platform file representation (org.wag.valueobjects.java.File) having the boolean flag "folder" with true value.

Tree permissions

Adds a single permission to a folder and its contents. It is possible to specify a role for files and a role for folders (for example to make folders read only and files read/write). additionlRoles lets to specify the “commenter” role or other future capabilities. recursive lets to go deep in the folder tree, otherwise it stops on the first level inside folderId** . Notifications with a message can be sent for every resource.

Syntax

utils.addPermissionsToGoogleDriveFolder(userId, folderId, type, value, fileRole, folderRole, additionalRoles, updateBaseFolder, recursive, sendNotifications, message)

utils.addPermissionsToGoogleDriveFolder(folderId, type, value, fileRole, folderRole, additionalRoles, updateBaseFolder, recursive, sendNotifications, message)

Details

folderId – the id of the original folder type – the type of sharing, one between "user", "group", "domain" or "default" value – the email of the user/group or the domain name fileRole – the role for files, one of "reader", "writer" or "owner" folderRole – the role for folders, one of "reader", "writer" or "ownerv additionalRoles – optional string, for example "commenter" updateBaseFolder – true or false. If true applies permissions to the base folder identified by folderId. recursive – true or false. If true applies permissions to all subtree, otherwise only to the first level. sendNotifications – true or false. Specify if send the notification to the user/group specified in the value. message – optional message for the notification. Return value - the Platform file representation (org.wag.valueobjects.java.File) having the boolean flag "folder" with true value.

Return the value of a property for the specified file and visibility

Syntax

utils.getGoogleDriveFileProperty(userId, fileId, key, visibility)

utils.getGoogleDriveFileProperty(fileId, key, visibility)

Details

fileId – the id of the file/folder key – the key of the property to get visibility – "PRIVATE" or "PUBLIC" Return value - a String containing the property value.

Add property for the specified file and visibility

Syntax

utils.addGoogleDriveFileProperty(userId, fileId, key, value, visibility)

utils.addGoogleDriveFileProperty(fileId, key, value, visibility)

Details

fileId – the id of the file/folder key – the key of the property to get value – the value visibility – "PRIVATE" or "PUBLIC"

Patches a property for the specified file and visibility

Syntax

utils.patchGoogleDriveFileProperty(userId, fileId, key, value, visibility)

utils.patchGoogleDriveFileProperty(fileId, key, value, visibility)

Details

fileId – the id of the file/folder key – the key of the property to get value – the value visibility – "PRIVATE" or "PUBLIC"

Patches a property for the specified file

Syntax

utils.deleteGoogleDriveFileProperty(userId, fileId, key)

utils.deleteGoogleDriveFileProperty(fileId, key)

Details

fileId – the id of the file/folder key – the key of the property to get

Update property of a file in Google Drive

(v6.0.2) Update the property of file in Google Drive.

Syntax

utils.updateGoogleDriveFile(userId, fileId, title, description, mimeType)

utils.updateGoogleDriveFile(fileId, title, description, mimeType)

Details

fileId – the id of the file in Google Drive title – the new title of the file description – the new description of file mimeType – the new mime type of file

Remove permissions of file

(v6.0.2) Remove the permission of file for a user

Syntax

utils.removeGoogleDriveFilePermissions(userId, fileId, emailUser)

utils.removeGoogleDriveFilePermissions(fileId, title, emailUser)

Details

fileId – the id of the file in Google Drive emailUser – the account of user for which to remove the permission

PreviousCalendarNextContacts

Last updated 4 years ago

Was this helpful?