IntegrationsGoogle workspaceActions
Create Google Drive permission
Create a permission on a Drive file the connected principal can access.
drive.permissions.create · Google Workspace · v1
Details
Scopes
https://www.googleapis.com/auth/drive
Input
| Name | Type | Required | Constraints |
|---|---|---|---|
(root) | object | Yes | additionalProperties false; oneOf branch 1: required email_address; type=user|group / branch 2: required domain; type=domain / branch 3: type=anyone |
file_id | string | Yes | minLength 1; maxLength 256 |
role | string | Yes | enum reader | commenter | writer | fileOrganizer | organizer |
type | string | Yes | enum user | group | domain | anyone |
email_address | string | No | minLength 3; maxLength 320 |
domain | string | No | minLength 1; maxLength 256 |
Output
| Name | Type | Required | Constraints |
|---|---|---|---|
(root) | object | Yes | additionalProperties false |
id | string | Yes | maxLength 256 |
role | string | Yes | maxLength 64 |
type | string | Yes | maxLength 64 |
email_address | string | No | maxLength 320 |
domain | string | No | maxLength 256 |
view | string | No | maxLength 64 |
allow_file_discovery | boolean | No | — |
expires_at | string | No | maxLength 64 |
deleted | boolean | No | — |
pending_owner | boolean | No | — |
inherited_permissions_disabled | boolean | No | — |
permission_details | array<object> | Yes | maxItems 20 |
permission_details[] | object | Yes | additionalProperties false |
permission_details[].permission_type | string | No | maxLength 64 |
permission_details[].role | string | Yes | maxLength 64 |
permission_details[].inherited | boolean | Yes | — |
permission_details[].inherited_from_id | string | No | maxLength 256 |
Raw schema
Input
{
"type": "object",
"additionalProperties": false,
"properties": {
"file_id": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"role": {
"type": "string",
"enum": [
"reader",
"commenter",
"writer",
"fileOrganizer",
"organizer"
]
},
"type": {
"type": "string",
"enum": [
"user",
"group",
"domain",
"anyone"
]
},
"email_address": {
"type": "string",
"minLength": 3,
"maxLength": 320
},
"domain": {
"type": "string",
"minLength": 1,
"maxLength": 256
}
},
"required": [
"file_id",
"role",
"type"
],
"oneOf": [
{
"required": [
"email_address"
],
"properties": {
"type": {
"enum": [
"user",
"group"
]
}
}
},
{
"required": [
"domain"
],
"properties": {
"type": {
"enum": [
"domain"
]
}
}
},
{
"properties": {
"type": {
"enum": [
"anyone"
]
}
}
}
]
}Output
{
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"maxLength": 256
},
"role": {
"type": "string",
"maxLength": 64
},
"type": {
"type": "string",
"maxLength": 64
},
"email_address": {
"type": "string",
"maxLength": 320
},
"domain": {
"type": "string",
"maxLength": 256
},
"view": {
"type": "string",
"maxLength": 64
},
"allow_file_discovery": {
"type": "boolean"
},
"expires_at": {
"type": "string",
"maxLength": 64
},
"deleted": {
"type": "boolean"
},
"pending_owner": {
"type": "boolean"
},
"inherited_permissions_disabled": {
"type": "boolean"
},
"permission_details": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"permission_type": {
"type": "string",
"maxLength": 64
},
"role": {
"type": "string",
"maxLength": 64
},
"inherited": {
"type": "boolean"
},
"inherited_from_id": {
"type": "string",
"maxLength": 256
}
},
"required": [
"role",
"inherited"
]
},
"maxItems": 20
}
},
"required": [
"id",
"role",
"type",
"permission_details"
]
}