Create Team Folder In Zoho WorkDrive
Table of Contents
Description
The zoho.workdrive.createTeamFolder task creates a team folder for the specified team.
Syntax
<response> = zoho.workdrive.createTeamFolder(<folder_name>, <parent_id>, <description>, <is_public_within_team>, <connection>);
Params | Data type | Description |
<response> | KEY-VALUE | The details of the new team folder that will be created. |
<folder_name> | TEXT | The name of the team folder that will be created. |
<parent_id> | TEXT | The ID of the team for which the folder will be created. Note: You can get the parent_id parameter from the Zoho WorkDrive URL. The URL will be in the following format: |
<description> | TEXT | The description of the team folder that will be created. |
<is_public_within_team> | BOOLEAN | This parameter decides the type of the team folder. Allowed values:
|
<connection> | TEXT | The name of the connection. Note:
|
Example
The following script creates a new folder for the team of ID - af0u7XXXXXXXXXXXXXXXXXXXXXXXXXXXee228.
response = zoho.workdrive.createTeamFolder("Marketing", "af0u7XXXXXXXXXXXXXXXXXXXXXXXXXXXee228", "This is a team folder", false, "workdrive_oauth_connection");
where:
response
"Marketing"
"af0u7XXXXXXXXXXXXXXXXXXXXXXXXXXXee228"
"This is a team folder"
false
"workdrive_oauth_connection"
Response Format
Success Response
The success response will be returned in the following format:
{
{
"data": {
"id": "o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a",
"type": "workspaces",
"attributes": {
"is_public_within_team": false,
"groups_count": 0,
"created_time_in_milliseconds": 1566814663387,
"description": "This is a team folder", "is_built_in": false,
"storage_info": {
"size": "0 bytes",
"storage_used": "0 bytes",
"files_count": 0,
"folders_count": 0,
"size_in_bytes": 0,
"storage_used_in_bytes": 0
},
"last_accessed_time_in_milliseconds": 1566814663387,
"is_current_user_admin": true,
"files_view_pref": {
"sort_by": "last_modified",
"sort_order": "desc",
"filtered_by": "all",
"layout": "list"
},
"unread_count": 0,
"role_id": 1,
"shared_view_pref": {
"sort_by": "last_modified",
"sort_order": "desc",
"filtered_by": "all",
"layout": "list"
},
"last_accessed_time": "Aug 26, 3:47 PM",
"is_share_allowed": true,
"created_time": "Aug 26, 3:47 PM",
"collaborators_count": 1,
"capabilities": {
"can_read": true,
"can_share": true,
"can_delete": true,
"can_edit": true,
"can_manage": true,
"can_create_files": true,
"can_upload_files": true,
"can_trash_files": true,
"can_leave": true,
"can_add_members": true,
"can_join": false,
"can_download_files": true
},
"unread_view_pref": {
"sort_by": "last_modified",
"sort_order": "desc",
"filtered_by": "all",
"layout": "list"
},
"incomingfiles_view_pref": {
"sort_by": "shared_time",
"sort_order": "desc",
"filtered_by": "all",
"layout": "list"
},
"is_org_team_folder": false,
"is_partof": true,
"is_default": false,
"created_by": "Shawn",
"created_by_zuid": "58131170",
"parent_id": "af0u7XXXXXXXXXXXXXXXXXXXXXXXXXXXee228",
"last_accessed_by": "Shawn",
"is_unread": false,
"name": "New Team Folder",
"status": 1
},
"relationships": {
"settings": {
"links": {
"self": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/relationships/settings",
"related": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/settings"
}
},
"folders": {
"links": {
"self": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/relationships/folders",
"related": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/folders"
}
},
"incomingfiles": {
"links": {
"self": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/relationships/incomingfiles",
"related": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/incomingfiles"
}
},
"trashedfiles": {
"links": {
"self": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/relationships/trashedfiles",
"related": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/trashedfiles"
}
},
"mydrafts": {
"links": {
"self": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/relationships/mydrafts",
"related": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/mydrafts"
}
},
"deletedfiles": {
"links": {
"self": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/relationships/deletedfiles",
"related": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/deletedfiles"
}
},
"permissions": {
"links": {
"self": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/relationships/permissions",
"related": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/permissions"
}
},
"files": {
"links": {
"self": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/relationships/files",
"related": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/files"
}
},
"timeline": {
"links": {
"self": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/relationships/timeline",
"related": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/timeline"
}
},
"links": {
"links": {
"self": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/relationships/links",
"related": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/links"
}
},
"incomingfolders": {
"links": {
"self": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/relationships/incomingfolders",
"related": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/incomingfolders"
}
},
"copy": {
"links": {
"self": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/relationships/copy",
"related": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/copy"
}
},
"unreadfiles": {
"links": {
"self": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/relationships/unreadfiles",
"related": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/unreadfiles"
}
},
"outgoingfiles": {
"links": {
"self": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/relationships/outgoingfiles",
"related": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a/outgoingfiles"
}
}
},
"links": {
"self": "https://workdrive.zoho.com/api/v1/workspaces/o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX9644a"
}
}
}
Failure Response
The failure response for an incorrect parent ID will be returned in the following format:
{
"errors": [
{
"id": "R008",
"title": "Unauthorized access"
}
]
}The failure response for an existing team folder name will be returned in the following format:
{
"errors": [
{
"id": "R003",
"title": "Workspace with same name exists in your team. Please use a different name"
}
]
}The failure response for null value in team folder name parameter will be returned in the following format:
{
"errors": [
{
"id": "F000",
"title": "General Exception"
}
]
}