Skip to main content

Create Permission

Creates a permission for a file or shared drive.

External Documentation

To learn more, visit the Google Drive documentation.

Basic Parameters

ParameterDescription
Email AddressThe email address of the user or group to which this permission refers.
File IDThe ID of the file or shared drive.
RoleThe role granted by this permission. While new values may be supported in the future, the following are currently allowed:
  • owner
  • organizer
  • fileOrganizer
  • writer
  • commenter
  • reader.
Supports All DrivesWhether the requesting application supports both My Drives and shared drives.
TypeThe type of the grantee. Valid values are:
  • user
  • group
  • domain
  • anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type.

Advanced Parameters

ParameterDescription
Allow File DiscoveryWhether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
Delegated User OverridePerform the action on behalf of another user, overriding the delegated user defined in the connection.If not specified, the delegated user is the one provided in the connection.Has no effect when using an OAuth connection.NOTE: the connection details are not edited by this input.
DomainThe domain to which this permission refers.
Email MessageA plain text custom message to include in the notification email.
Expiration TimeThe time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
  • They cannot be set on shared drive items
  • They can only be set on user and group permissions
  • The time must be in the future
  • The time cannot be more than a year in the future.
Move To New Owners RootThis parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, parents are not changed.
Pending OwnerWhether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.
Send Notification EmailWhether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers.
Transfer OwnershipWhether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. File owners can only transfer ownership of files existing on My Drive. Files existing in a shared drive are owned by the organization that owns that shared drive. Ownership transfers are not supported for files and folders in shared drives. Organizers of a shared drive can move items from that shared drive into their My Drive which transfers the ownership to them.
Use Domain Admin AccessIssue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.
ViewIndicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.

Example Output

{
"allowFileDiscovery": false,
"deleted": false,
"displayName": "The \"pretty\" name of the value of the permission. The following is a list of examples for each type of permission: \n- user - User's full name, as defined for their Google account, such as \"Joe Smith.\" \n- group - Name of the Google Group, such as \"The Company Administrators.\" \n- domain - String domain name, such as \"thecompany.com.\" \n- anyone - No displayName is present.",
"domain": "The domain to which this permission refers.",
"emailAddress": "The email address of the user or group to which this permission refers.",
"expirationTime": "The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: \n- They cannot be set on shared drive items \n- They can only be set on user and group permissions \n- The time must be in the future \n- The time cannot be more than a year in the future",
"id": "The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.",
"kind": "drive#permission",
"pendingOwner": false,
"permissionDetails": [
{
"inherited": false,
"inheritedFrom": "The ID of the item from which this permission is inherited. This is an output-only field.",
"permissionType": "The permission type for this user. While new values may be added in future, the following are currently possible: \n- file \n- member",
"role": "The primary role for this user. While new values may be added in the future, the following are currently possible: \n- organizer \n- fileOrganizer \n- writer \n- commenter \n- reader"
}
],
"photoLink": "A link to the user's profile photo, if available.",
"role": "The role granted by this permission. While new values may be supported in the future, the following are currently allowed: \n- owner \n- organizer \n- fileOrganizer \n- writer \n- commenter \n- reader",
"teamDrivePermissionDetails": [
{
"inherited": false,
"inheritedFrom": "Deprecated - use permissionDetails/inheritedFrom instead.",
"role": "Deprecated - use permissionDetails/role instead.",
"teamDrivePermissionType": "Deprecated - use permissionDetails/permissionType instead."
}
],
"type": "The type of the grantee. Valid values are: \n- user \n- group \n- domain \n- anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type.",
"view": "Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value."
}

Workflow Library Example

Create Permission with Google Drive and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop