# Zoho WorkDrive

> Team file storage. Upload, download, create, move, copy, rename and trash files and folders, create Zoho documents, search, and share files with external links.

App · File Storage · 20 actions. Web page: https://docs.lodol.com/docs/integrations/zoho-workdrive

## Actions

### Copy file or folder

Copy a file or folder into a folder; returns the new copy.

**Inputs**

- File or folder ID (`item_id`, text, required): The file or folder's id (id from 'List folder items' or 'Search'), or its WorkDrive link.
- Destination folder ID (`destination_folder_id`, text, required): The folder to put it in: a folder id, myfolder_id from 'Get My Folders', a team folder id, or the folder's WorkDrive link.

**Outputs**: The new copy.

- `created_by` (text): Who created it.
- `created_time` (text): When it was created, as Zoho shows it.
- `created_time_in_millisecond` (number): When it was created, in Unix milliseconds.
- `description` (text): The description.
- `download_url` (text): Zoho's download address (needs a signed-in user).
- `extn` (text): The file extension.
- `favorite` (true/false): Whether the connected user starred it.
- `files_count` (number): For a folder, how many files it holds.
- `folders_count` (number): For a folder, how many folders it holds.
- `has_folders` (true/false): Whether a folder contains folders.
- `id` (text): The file or folder id.
- `is_folder` (true/false): Whether it is a folder.
- `library_id` (text): The id of the team folder or My Folders it lives in.
- `modified_by` (text): Who last changed it.
- `modified_time` (text): When it was last changed, as Zoho shows it.
- `modified_time_in_millisecond` (number): When it was last changed, in Unix milliseconds.
- `name` (text): The name.
- `parent_id` (text): The id of the folder it is in.
- `permalink` (text): The link that opens it in WorkDrive.
- `resource_type` (number): Zoho's numeric resource type.
- `service_type` (text): The Zoho app that owns it, for example upload or zw.
- `size` (text): The size, for example 12 KB.
- `size_in_bytes` (number): The size in bytes.
- `source_id` (text): The id of the item that was copied.
- `status` (number): 1 when active, 51 when in the trash.
- `thumbnail_url` (text): A thumbnail address, for images and documents.
- `type` (text): The kind, for example folder, file, image, writer or zohosheet.

**Example output**

```json
{
  "created_by": "Ada Lovelace",
  "created_time": "Oct 1, 9:00 AM",
  "created_time_in_millisecond": 1790000000000,
  "description": "",
  "download_url": "https://workdrive.zoho.com/download/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "extn": "txt",
  "favorite": false,
  "files_count": null,
  "folders_count": null,
  "has_folders": false,
  "id": "c0py4d3a7f2d6c3b84a2d9e9e4c1f0a2b1c3e",
  "is_folder": false,
  "library_id": "9z0lr3e36bb76f2b84f4c84a5cd8b4f6eb67d",
  "modified_by": "Ada Lovelace",
  "modified_time": "Oct 1, 9:00 AM",
  "modified_time_in_millisecond": 1790000000000,
  "name": "report.txt",
  "parent_id": "q6ix5d3a7f2d6c3b84a2d9e9e4c1f0a2b1c3e",
  "permalink": "https://workdrive.zoho.com/file/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "resource_type": 1,
  "service_type": "upload",
  "size": "28 bytes",
  "size_in_bytes": 28,
  "source_id": "ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "status": 1,
  "thumbnail_url": null,
  "type": "file"
}
```

### Create folder

Create a folder inside a folder, My Folders or a team folder.

**Inputs**

- Folder ID (`parent_id`, text, required): The folder to create it in: myfolder_id from 'Get My Folders', a team folder's id from 'List team folders', a folder's id, or its WorkDrive link.
- Folder name (`name`, text, required): The new folder's name, up to 200 characters.

**Outputs**: A WorkDrive file or folder.

- `created_by` (text): Who created it.
- `created_time` (text): When it was created, as Zoho shows it.
- `created_time_in_millisecond` (number): When it was created, in Unix milliseconds.
- `description` (text): The description.
- `download_url` (text): Zoho's download address (needs a signed-in user).
- `extn` (text): The file extension.
- `favorite` (true/false): Whether the connected user starred it.
- `files_count` (number): For a folder, how many files it holds.
- `folders_count` (number): For a folder, how many folders it holds.
- `has_folders` (true/false): Whether a folder contains folders.
- `id` (text): The file or folder id.
- `is_folder` (true/false): Whether it is a folder.
- `library_id` (text): The id of the team folder or My Folders it lives in.
- `modified_by` (text): Who last changed it.
- `modified_time` (text): When it was last changed, as Zoho shows it.
- `modified_time_in_millisecond` (number): When it was last changed, in Unix milliseconds.
- `name` (text): The name.
- `parent_id` (text): The id of the folder it is in.
- `permalink` (text): The link that opens it in WorkDrive.
- `resource_type` (number): Zoho's numeric resource type.
- `service_type` (text): The Zoho app that owns it, for example upload or zw.
- `size` (text): The size, for example 12 KB.
- `size_in_bytes` (number): The size in bytes.
- `status` (number): 1 when active, 51 when in the trash.
- `thumbnail_url` (text): A thumbnail address, for images and documents.
- `type` (text): The kind, for example folder, file, image, writer or zohosheet.

**Example output**

```json
{
  "created_by": "Ada Lovelace",
  "created_time": "Oct 1, 9:00 AM",
  "created_time_in_millisecond": 1790000000000,
  "description": "",
  "download_url": "https://workdrive.zoho.com/download/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "extn": "",
  "favorite": false,
  "files_count": 0,
  "folders_count": 0,
  "has_folders": false,
  "id": "q6ix5d3a7f2d6c3b84a2d9e9e4c1f0a2b1c3e",
  "is_folder": true,
  "library_id": "9z0lr3e36bb76f2b84f4c84a5cd8b4f6eb67d",
  "modified_by": "Ada Lovelace",
  "modified_time": "Oct 1, 9:00 AM",
  "modified_time_in_millisecond": 1790000000000,
  "name": "Reports",
  "parent_id": "9z0lr3e36bb76f2b84f4c84a5cd8b4f6eb67d",
  "permalink": "https://workdrive.zoho.com/folder/q6ix5d3a7f2d6c3b84a2d9e9e4c1f0a2b1c3e",
  "resource_type": 1,
  "service_type": "",
  "size": "28 bytes",
  "size_in_bytes": 28,
  "status": 1,
  "thumbnail_url": null,
  "type": "folder"
}
```

### Create share link

Create an external link that lets anyone with it open a file or folder, optionally with a password and an expiry date.

**Inputs**

- File or folder ID (`item_id`, text, required): The file or folder's id (id from 'List folder items' or 'Search'), or its WorkDrive link.
- Link name (`link_name`, text, required): A name to recognise the link by.
- Visitors can (`access`, text): Optional; View by default. Folders allow View, Edit or Upload; Zoho files View, View and comment or Edit; other files only View. One of: `34` (View), `6` (View and comment (Zoho files)), `5` (Edit (folders and Zoho files)), `7` (Upload (folders)). Default: `34`.
- Allow download (`allow_download`, true/false): Optional. Let visitors download it. On by default. Default: `true`.
- Password (`password`, text): Optional. A password visitors must enter.
- Expires on (`expires_on`, date): Optional. The last day the link works.

**Outputs**: An external share link.

- `allow_download` (true/false): Whether visitors may download.
- `created_by` (text): Who created it.
- `created_time_in_millis` (number): When it was created, in Unix milliseconds.
- `download_url` (text): A direct download address, when downloads are allowed.
- `expiration_date` (text): When it expires, if it does.
- `file_name` (text): The shared item's name.
- `is_expired` (true/false): Whether it has expired.
- `is_password_protected` (true/false): Whether it needs a password.
- `link` (text): The address to share.
- `link_id` (text): The link id - use it to revoke the link.
- `link_name` (text): The link's name.
- `link_type` (text): custom or download.
- `resource_id` (text): The shared item's id.
- `role_id` (number): What the link allows: 34 view, 6 view and comment, 5 edit, 7 upload.
- `status` (number): 1 when active.

**Example output**

```json
{
  "allow_download": true,
  "created_by": "Ada Lovelace",
  "created_time_in_millis": 1790000000000,
  "download_url": null,
  "expiration_date": null,
  "file_name": "Reports",
  "is_expired": false,
  "is_password_protected": false,
  "link": "https://workdrive.zohoexternal.com/external/3iWUoMURXKC-OCgNc",
  "link_id": "3iWUoMURXKC-OCgNc",
  "link_name": "Client review",
  "link_type": "custom",
  "resource_id": "q6ix5d3a7f2d6c3b84a2d9e9e4c1f0a2b1c3e",
  "role_id": 34,
  "status": 1
}
```

### Create Zoho document

Create a blank Zoho Writer document, Zoho Sheet spreadsheet or Zoho Show presentation in a folder.

**Inputs**

- Folder ID (`parent_id`, text, required): The folder to create it in: myfolder_id from 'Get My Folders', a team folder's id from 'List team folders', a folder's id, or its WorkDrive link.
- Name (`name`, text, required): The new file's name, without an extension.
- Kind (`document_type`, text, required): What to create. One of: `zw` (Zoho Writer document), `zohosheet` (Zoho Sheet spreadsheet), `zohoshow` (Zoho Show presentation).

**Outputs**: A WorkDrive file or folder.

- `created_by` (text): Who created it.
- `created_time` (text): When it was created, as Zoho shows it.
- `created_time_in_millisecond` (number): When it was created, in Unix milliseconds.
- `description` (text): The description.
- `download_url` (text): Zoho's download address (needs a signed-in user).
- `extn` (text): The file extension.
- `favorite` (true/false): Whether the connected user starred it.
- `files_count` (number): For a folder, how many files it holds.
- `folders_count` (number): For a folder, how many folders it holds.
- `has_folders` (true/false): Whether a folder contains folders.
- `id` (text): The file or folder id.
- `is_folder` (true/false): Whether it is a folder.
- `library_id` (text): The id of the team folder or My Folders it lives in.
- `modified_by` (text): Who last changed it.
- `modified_time` (text): When it was last changed, as Zoho shows it.
- `modified_time_in_millisecond` (number): When it was last changed, in Unix milliseconds.
- `name` (text): The name.
- `parent_id` (text): The id of the folder it is in.
- `permalink` (text): The link that opens it in WorkDrive.
- `resource_type` (number): Zoho's numeric resource type.
- `service_type` (text): The Zoho app that owns it, for example upload or zw.
- `size` (text): The size, for example 12 KB.
- `size_in_bytes` (number): The size in bytes.
- `status` (number): 1 when active, 51 when in the trash.
- `thumbnail_url` (text): A thumbnail address, for images and documents.
- `type` (text): The kind, for example folder, file, image, writer or zohosheet.

**Example output**

```json
{
  "created_by": "Ada Lovelace",
  "created_time": "Oct 1, 9:00 AM",
  "created_time_in_millisecond": 1790000000000,
  "description": "",
  "download_url": "https://workdrive.zoho.com/download/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "extn": "zdoc",
  "favorite": false,
  "files_count": null,
  "folders_count": null,
  "has_folders": false,
  "id": "ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "is_folder": false,
  "library_id": "9z0lr3e36bb76f2b84f4c84a5cd8b4f6eb67d",
  "modified_by": "Ada Lovelace",
  "modified_time": "Oct 1, 9:00 AM",
  "modified_time_in_millisecond": 1790000000000,
  "name": "Meeting notes",
  "parent_id": "q6ix5d3a7f2d6c3b84a2d9e9e4c1f0a2b1c3e",
  "permalink": "https://workdrive.zoho.com/file/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "resource_type": 2101,
  "service_type": "zw",
  "size": "28 bytes",
  "size_in_bytes": 28,
  "status": 1,
  "thumbnail_url": null,
  "type": "writer"
}
```

### Delete permanently

Permanently delete a file or folder that is already in the trash. This cannot be undone.

**Inputs**

- File or folder ID (`item_id`, text, required): The file or folder's id (id from 'List folder items' or 'Search'), or its WorkDrive link.

**Outputs**: The item whose state changed.

- `id` (text): The item id.
- `name` (text): The item's name, when Zoho returned it.
- `result` (text): trashed, restored or deleted.

**Example output**

```json
{
  "id": "ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "name": "report.txt",
  "result": "deleted"
}
```

### Download file

Download a file for later steps. A text file of 1 MB or less is also returned as text.

**Inputs**

- File ID (`item_id`, text, required): The file's id (id from 'List folder items' or 'Search'), or its WorkDrive link.
- Version (`version`, number): Optional. An earlier version number; blank for the latest. At least 1.

**Outputs**: The downloaded file.

- `content_type` (text): The file's media type.
- `document_ref` (text): A reference to the stored file, for later steps.
- `file_name` (text): The file's name.
- `item_id` (text): The file's id.
- `size_in_bytes` (number): The file's size in bytes.
- `text` (text): The contents, for a text file of 1 MB or less; otherwise empty.

**Example output**

```json
{
  "content_type": "text/plain",
  "document_ref": "doc_00000000000000000000000000000000",
  "file_name": "report.txt",
  "item_id": "ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "size_in_bytes": 28,
  "text": "Quarterly numbers look good."
}
```

### Get current user

Get the connected WorkDrive user: name, email, Zoho user id, default team and storage use.

**Inputs**: None.

**Outputs**: The connected WorkDrive user.

- `avatar_url` (text): The user's picture.
- `display_name` (text): The user's name.
- `edition` (text): The WorkDrive edition, for example TEAM.
- `email_id` (text): The user's email address.
- `has_myfolder` (true/false): Whether the user has My Folders.
- `member_type` (number): The user's member type.
- `org_id` (text): The Zoho organization id.
- `preferred_team_id` (text): The id of the team WorkDrive opens by default.
- `role_id` (number): The user's role id in the preferred team.
- `status` (text): The account status, for example ACTIVE.
- `storage_info` (object): Storage use.
- `zuid` (text): The user's Zoho user id.

**Example output**

```json
{
  "avatar_url": "",
  "display_name": "Ada Lovelace",
  "edition": "TEAM",
  "email_id": "ada@example.com",
  "has_myfolder": true,
  "member_type": 1,
  "org_id": "749422001",
  "preferred_team_id": "ly9zmae16b43c258f458a9a57ac02c4f8d763",
  "role_id": 1,
  "status": "ACTIVE",
  "storage_info": {
    "files_count": 1,
    "folders_count": 1,
    "size": "5 GB",
    "size_in_bytes": 5368709120,
    "storage_used": "28 bytes",
    "storage_used_in_bytes": 28
  },
  "zuid": "749422000"
}
```

### Get file or folder

Get a file or folder's details: name, kind, folder, size, link.

**Inputs**

- File or folder ID (`item_id`, text, required): The file or folder's id (id from 'List folder items' or 'Search'), or its WorkDrive link.

**Outputs**: A WorkDrive file or folder.

- `created_by` (text): Who created it.
- `created_time` (text): When it was created, as Zoho shows it.
- `created_time_in_millisecond` (number): When it was created, in Unix milliseconds.
- `description` (text): The description.
- `download_url` (text): Zoho's download address (needs a signed-in user).
- `extn` (text): The file extension.
- `favorite` (true/false): Whether the connected user starred it.
- `files_count` (number): For a folder, how many files it holds.
- `folders_count` (number): For a folder, how many folders it holds.
- `has_folders` (true/false): Whether a folder contains folders.
- `id` (text): The file or folder id.
- `is_folder` (true/false): Whether it is a folder.
- `library_id` (text): The id of the team folder or My Folders it lives in.
- `modified_by` (text): Who last changed it.
- `modified_time` (text): When it was last changed, as Zoho shows it.
- `modified_time_in_millisecond` (number): When it was last changed, in Unix milliseconds.
- `name` (text): The name.
- `parent_id` (text): The id of the folder it is in.
- `permalink` (text): The link that opens it in WorkDrive.
- `resource_type` (number): Zoho's numeric resource type.
- `service_type` (text): The Zoho app that owns it, for example upload or zw.
- `size` (text): The size, for example 12 KB.
- `size_in_bytes` (number): The size in bytes.
- `status` (number): 1 when active, 51 when in the trash.
- `thumbnail_url` (text): A thumbnail address, for images and documents.
- `type` (text): The kind, for example folder, file, image, writer or zohosheet.

**Example output**

```json
{
  "created_by": "Ada Lovelace",
  "created_time": "Oct 1, 9:00 AM",
  "created_time_in_millisecond": 1790000000000,
  "description": "",
  "download_url": "https://workdrive.zoho.com/download/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "extn": "txt",
  "favorite": false,
  "files_count": null,
  "folders_count": null,
  "has_folders": false,
  "id": "ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "is_folder": false,
  "library_id": "9z0lr3e36bb76f2b84f4c84a5cd8b4f6eb67d",
  "modified_by": "Ada Lovelace",
  "modified_time": "Oct 1, 9:00 AM",
  "modified_time_in_millisecond": 1790000000000,
  "name": "report.txt",
  "parent_id": "q6ix5d3a7f2d6c3b84a2d9e9e4c1f0a2b1c3e",
  "permalink": "https://workdrive.zoho.com/file/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "resource_type": 1,
  "service_type": "upload",
  "size": "28 bytes",
  "size_in_bytes": 28,
  "status": 1,
  "thumbnail_url": null,
  "type": "file"
}
```

### Get My Folders

Get the id of your My Folders in a team, to use as the folder for new files and folders.

**Inputs**

- Team (`workdrive_team_id`, text): Optional. The WorkDrive team; leave blank for your default team. Pick it from the list or type its id (team_id from 'List teams').

**Outputs**: The connected user's My Folders in a team.

- `display_name` (text): The user's name.
- `email_id` (text): The user's email address.
- `myfolder_id` (text): The My Folders id - use it as a parent folder id.
- `team_id` (text): The team id.
- `team_member_id` (text): The user's id as a member of that team.

**Example output**

```json
{
  "display_name": "Ada Lovelace",
  "email_id": "ada@example.com",
  "myfolder_id": "9z0lr3e36bb76f2b84f4c84a5cd8b4f6eb67d",
  "team_id": "ly9zmae16b43c258f458a9a57ac02c4f8d763",
  "team_member_id": "ly9zmae16b43c258f458a9a57ac02c4f8d763-749422000"
}
```

### List folder items

List the files and folders inside a folder, My Folders or a team folder, a page at a time.

**Inputs**

- Folder ID (`folder_id`, text, required): The folder: myfolder_id from 'Get My Folders', a team folder id, a folder id, or the folder's WorkDrive link.
- Only (`item_type`, text): Optional. Only this kind of item. One of: `all` (Everything), `allfiles` (All files), `folder` (Folders), `documents`, `spreadsheets`, `presentations`, `pdf` (PDFs), `images`, `audio`, `video`, and 7 more.
- Extensions (`extensions`, text): Optional. Only these file extensions, for example docx,pdf.
- Sort by (`sort`, text): Optional. The order to list them in. One of: `name` (Name (A-Z)), `-name` (Name (Z-A)), `last_modified` (Last modified (oldest first)), `-last_modified` (Last modified (newest first)), `created_time` (Created (oldest first)), `-created_time` (Created (newest first)), `size` (Size (smallest first)), `-size` (Size (largest first)), `kind` (Kind (A-Z)), `-kind` (Kind (Z-A)), and 6 more.
- Page size (`limit`, number): Optional. How many to return, 1 to 50. From 1 to 50.
- Skip (`offset`, number): Optional. How many to skip first, for the next page (0 to start). At least 0.

**Outputs**: A page of a folder's files and folders.

- `count` (number): How many were returned.
- `has_more` (true/false): Whether a full page came back, so more may follow.
- `items` (list): The files and folders.

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "items": [
    {
      "created_by": "Ada Lovelace",
      "created_time": "Oct 1, 9:00 AM",
      "created_time_in_millisecond": 1790000000000,
      "description": "",
      "download_url": "https://workdrive.zoho.com/download/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
      "extn": "txt",
      "favorite": false,
      "files_count": null,
      "folders_count": null,
      "has_folders": false,
      "id": "ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
      "is_folder": false,
      "library_id": "9z0lr3e36bb76f2b84f4c84a5cd8b4f6eb67d",
      "modified_by": "Ada Lovelace",
      "modified_time": "Oct 1, 9:00 AM",
      "modified_time_in_millisecond": 1790000000000,
      "name": "report.txt",
      "parent_id": "q6ix5d3a7f2d6c3b84a2d9e9e4c1f0a2b1c3e",
      "permalink": "https://workdrive.zoho.com/file/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
      "resource_type": 1,
      "service_type": "upload",
      "size": "28 bytes",
      "size_in_bytes": 28,
      "status": 1,
      "thumbnail_url": null,
      "type": "file"
    }
  ]
}
```

### List share links

List a file or folder's external share links.

**Inputs**

- File or folder ID (`item_id`, text, required): The file or folder's id (id from 'List folder items' or 'Search'), or its WorkDrive link.
- Only (`link_type`, text): Optional. Only this kind of link. One of: `custom` (Share links), `download` (Download links).

**Outputs**: An item's external share links.

- `count` (number): How many links.
- `links` (list): The share links.

**Example output**

```json
{
  "count": 1,
  "links": [
    {
      "allow_download": true,
      "created_by": "Ada Lovelace",
      "created_time_in_millis": 1790000000000,
      "download_url": null,
      "expiration_date": null,
      "file_name": "Reports",
      "is_expired": false,
      "is_password_protected": false,
      "link": "https://workdrive.zohoexternal.com/external/3iWUoMURXKC-OCgNc",
      "link_id": "3iWUoMURXKC-OCgNc",
      "link_name": "Client review",
      "link_type": "custom",
      "resource_id": "q6ix5d3a7f2d6c3b84a2d9e9e4c1f0a2b1c3e",
      "role_id": 34,
      "status": 1
    }
  ]
}
```

### List team folders

List a team's team folders, with the id of each.

**Inputs**

- Team (`workdrive_team_id`, text): Optional. The WorkDrive team; leave blank for your default team. Pick it from the list or type its id (team_id from 'List teams').
- Only ones I belong to (`joined_only`, true/false): Optional. Only team folders you are a member of. Default: `false`.
- Page size (`limit`, number): Optional. How many to return, 1 to 50. From 1 to 50.
- Skip (`offset`, number): Optional. How many to skip first, for the next page (0 to start). At least 0.

**Outputs**: A page of the team's team folders.

- `count` (number): How many were returned.
- `has_more` (true/false): Whether a full page came back, so more may follow.
- `team_folders` (list): The team folders.

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "team_folders": [
    {
      "collaborators_count": 1,
      "created_by": "Ada Lovelace",
      "created_time": "Oct 1, 9:00 AM",
      "description": "",
      "id": "b1p6k8c4e7a1d3f5a9c2e4b6d8f0a1c3e5b7d",
      "is_built_in": false,
      "is_partof": true,
      "is_pinned": false,
      "is_public_within_team": true,
      "name": "Marketing",
      "parent_id": "ly9zmae16b43c258f458a9a57ac02c4f8d763",
      "role_id": 1,
      "status": 1
    }
  ]
}
```

### List teams

List the WorkDrive teams the connected user belongs to.

**Inputs**

- Zoho user ID (`zuid`, text): Optional. Whose teams to list (zuid from 'Get current user'); leave blank for the connected user.

**Outputs**: The connected user's WorkDrive teams.

- `count` (number): How many teams.
- `teams` (list): The teams.

**Example output**

```json
{
  "count": 1,
  "teams": [
    {
      "created_time": "Oct 1, 9:00 AM",
      "description": "",
      "is_current_user_admin": true,
      "is_preferred": true,
      "license_status": "ACTIVE",
      "member_type": 1,
      "name": "Lodol Demo",
      "plan_type": "TRIAL",
      "role_id": 1,
      "team_id": "ly9zmae16b43c258f458a9a57ac02c4f8d763",
      "user_count": 1
    }
  ]
}
```

### Move file or folder

Move a file or folder into another folder.

**Inputs**

- File or folder ID (`item_id`, text, required): The file or folder's id (id from 'List folder items' or 'Search'), or its WorkDrive link.
- Destination folder ID (`destination_folder_id`, text, required): The folder to put it in: a folder id, myfolder_id from 'Get My Folders', a team folder id, or the folder's WorkDrive link.

**Outputs**: A WorkDrive file or folder.

- `created_by` (text): Who created it.
- `created_time` (text): When it was created, as Zoho shows it.
- `created_time_in_millisecond` (number): When it was created, in Unix milliseconds.
- `description` (text): The description.
- `download_url` (text): Zoho's download address (needs a signed-in user).
- `extn` (text): The file extension.
- `favorite` (true/false): Whether the connected user starred it.
- `files_count` (number): For a folder, how many files it holds.
- `folders_count` (number): For a folder, how many folders it holds.
- `has_folders` (true/false): Whether a folder contains folders.
- `id` (text): The file or folder id.
- `is_folder` (true/false): Whether it is a folder.
- `library_id` (text): The id of the team folder or My Folders it lives in.
- `modified_by` (text): Who last changed it.
- `modified_time` (text): When it was last changed, as Zoho shows it.
- `modified_time_in_millisecond` (number): When it was last changed, in Unix milliseconds.
- `name` (text): The name.
- `parent_id` (text): The id of the folder it is in.
- `permalink` (text): The link that opens it in WorkDrive.
- `resource_type` (number): Zoho's numeric resource type.
- `service_type` (text): The Zoho app that owns it, for example upload or zw.
- `size` (text): The size, for example 12 KB.
- `size_in_bytes` (number): The size in bytes.
- `status` (number): 1 when active, 51 when in the trash.
- `thumbnail_url` (text): A thumbnail address, for images and documents.
- `type` (text): The kind, for example folder, file, image, writer or zohosheet.

**Example output**

```json
{
  "created_by": "Ada Lovelace",
  "created_time": "Oct 1, 9:00 AM",
  "created_time_in_millisecond": 1790000000000,
  "description": "",
  "download_url": "https://workdrive.zoho.com/download/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "extn": "txt",
  "favorite": false,
  "files_count": null,
  "folders_count": null,
  "has_folders": false,
  "id": "ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "is_folder": false,
  "library_id": "9z0lr3e36bb76f2b84f4c84a5cd8b4f6eb67d",
  "modified_by": "Ada Lovelace",
  "modified_time": "Oct 1, 9:00 AM",
  "modified_time_in_millisecond": 1790000000000,
  "name": "report.txt",
  "parent_id": "q6ix5d3a7f2d6c3b84a2d9e9e4c1f0a2b1c3e",
  "permalink": "https://workdrive.zoho.com/file/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "resource_type": 1,
  "service_type": "upload",
  "size": "28 bytes",
  "size_in_bytes": 28,
  "status": 1,
  "thumbnail_url": null,
  "type": "file"
}
```

### Move to trash

Move a file or folder to the trash, where it can be restored.

**Inputs**

- File or folder ID (`item_id`, text, required): The file or folder's id (id from 'List folder items' or 'Search'), or its WorkDrive link.

**Outputs**: The item whose state changed.

- `id` (text): The item id.
- `name` (text): The item's name, when Zoho returned it.
- `result` (text): trashed, restored or deleted.

**Example output**

```json
{
  "id": "ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "name": "report.txt",
  "result": "trashed"
}
```

### Rename file or folder

Give a file or folder a new name.

**Inputs**

- File or folder ID (`item_id`, text, required): The file or folder's id (id from 'List folder items' or 'Search'), or its WorkDrive link.
- New name (`name`, text, required): The new name; for a file, keep its extension.

**Outputs**: A WorkDrive file or folder.

- `created_by` (text): Who created it.
- `created_time` (text): When it was created, as Zoho shows it.
- `created_time_in_millisecond` (number): When it was created, in Unix milliseconds.
- `description` (text): The description.
- `download_url` (text): Zoho's download address (needs a signed-in user).
- `extn` (text): The file extension.
- `favorite` (true/false): Whether the connected user starred it.
- `files_count` (number): For a folder, how many files it holds.
- `folders_count` (number): For a folder, how many folders it holds.
- `has_folders` (true/false): Whether a folder contains folders.
- `id` (text): The file or folder id.
- `is_folder` (true/false): Whether it is a folder.
- `library_id` (text): The id of the team folder or My Folders it lives in.
- `modified_by` (text): Who last changed it.
- `modified_time` (text): When it was last changed, as Zoho shows it.
- `modified_time_in_millisecond` (number): When it was last changed, in Unix milliseconds.
- `name` (text): The name.
- `parent_id` (text): The id of the folder it is in.
- `permalink` (text): The link that opens it in WorkDrive.
- `resource_type` (number): Zoho's numeric resource type.
- `service_type` (text): The Zoho app that owns it, for example upload or zw.
- `size` (text): The size, for example 12 KB.
- `size_in_bytes` (number): The size in bytes.
- `status` (number): 1 when active, 51 when in the trash.
- `thumbnail_url` (text): A thumbnail address, for images and documents.
- `type` (text): The kind, for example folder, file, image, writer or zohosheet.

**Example output**

```json
{
  "created_by": "Ada Lovelace",
  "created_time": "Oct 1, 9:00 AM",
  "created_time_in_millisecond": 1790000000000,
  "description": "",
  "download_url": "https://workdrive.zoho.com/download/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "extn": "txt",
  "favorite": false,
  "files_count": null,
  "folders_count": null,
  "has_folders": false,
  "id": "ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "is_folder": false,
  "library_id": "9z0lr3e36bb76f2b84f4c84a5cd8b4f6eb67d",
  "modified_by": "Ada Lovelace",
  "modified_time": "Oct 1, 9:00 AM",
  "modified_time_in_millisecond": 1790000000000,
  "name": "report-final.txt",
  "parent_id": "q6ix5d3a7f2d6c3b84a2d9e9e4c1f0a2b1c3e",
  "permalink": "https://workdrive.zoho.com/file/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "resource_type": 1,
  "service_type": "upload",
  "size": "28 bytes",
  "size_in_bytes": 28,
  "status": 1,
  "thumbnail_url": null,
  "type": "file"
}
```

### Restore from trash

Restore a trashed file or folder to where it was.

**Inputs**

- File or folder ID (`item_id`, text, required): The file or folder's id (id from 'List folder items' or 'Search'), or its WorkDrive link.

**Outputs**: The item whose state changed.

- `id` (text): The item id.
- `name` (text): The item's name, when Zoho returned it.
- `result` (text): trashed, restored or deleted.

**Example output**

```json
{
  "id": "ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "name": "report.txt",
  "result": "restored"
}
```

### Revoke share link

Turn off an external share link so it stops working.

**Inputs**

- Link ID (`link_id`, text, required): The link's id (link_id from 'Create share link' or 'List share links').

**Outputs**: The revoked link.

- `link_id` (text): The link id.
- `revoked` (true/false): Always true.

**Example output**

```json
{
  "link_id": "3iWUoMURXKC-OCgNc",
  "revoked": true
}
```

### Search files and folders

Search a team's files and folders by name or contents. New files can take a short while to become searchable.

**Inputs**

- Search for (`query`, text, required): The text to look for.
- Team (`workdrive_team_id`, text): Optional. The WorkDrive team; leave blank for your default team. Pick it from the list or type its id (team_id from 'List teams').
- Search in (`search_in`, text): Optional. Where to look; names and contents by default. One of: `all` (Name and contents), `name` (Name only), `content` (Contents only).
- Only (`item_type`, text): Optional. Only this kind of item. One of: `all` (Everything), `allfiles` (All files), `folder` (Folders), `documents`, `spreadsheets`, `presentations`, `pdf` (PDFs), `images`, `audio`, `video`, and 7 more.
- Sort by (`sort`, text): Optional. The order of the results. One of: `name` (Name (A-Z)), `-name` (Name (Z-A)), `last_modified` (Last modified (oldest first)), `-last_modified` (Last modified (newest first)), `created_time` (Created (oldest first)), `-created_time` (Created (newest first)), `kind` (Kind (A-Z)), `-kind` (Kind (Z-A)), `shared_time` (Shared (oldest first)), `-shared_time` (Shared (newest first)).
- Page size (`limit`, number): Optional. How many to return, 1 to 50. From 1 to 50.
- Skip (`offset`, number): Optional. How many to skip first, for the next page (0 to start). At least 0.

**Outputs**: A page of search results.

- `count` (number): How many were returned.
- `has_more` (true/false): Whether a full page came back, so more may follow.
- `items` (list): The matching files and folders.

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "items": [
    {
      "created_by": "Ada Lovelace",
      "created_time": "Oct 1, 9:00 AM",
      "created_time_in_millisecond": 1790000000000,
      "description": "",
      "download_url": "https://workdrive.zoho.com/download/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
      "extn": "txt",
      "favorite": false,
      "files_count": null,
      "folders_count": null,
      "has_folders": false,
      "id": "ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
      "is_folder": false,
      "library_id": "9z0lr3e36bb76f2b84f4c84a5cd8b4f6eb67d",
      "modified_by": "Ada Lovelace",
      "modified_time": "Oct 1, 9:00 AM",
      "modified_time_in_millisecond": 1790000000000,
      "name": "report.txt",
      "parent_id": "q6ix5d3a7f2d6c3b84a2d9e9e4c1f0a2b1c3e",
      "permalink": "https://workdrive.zoho.com/file/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
      "resource_type": 1,
      "service_type": "upload",
      "size": "28 bytes",
      "size_in_bytes": 28,
      "status": 1,
      "team_id": "ly9zmae16b43c258f458a9a57ac02c4f8d763",
      "thumbnail_url": null,
      "type": "file"
    }
  ]
}
```

### Upload file

Upload a file, or text typed here, into a folder (up to 250 MB).

**Inputs**

- Folder ID (`parent_id`, text, required): The folder to create it in: myfolder_id from 'Get My Folders', a team folder's id from 'List team folders', a folder's id, or its WorkDrive link.
- File (`file`, text): The file to upload. Use this or 'Text content'.
- Text content (`content`, text): Text to upload as the file's contents. Use this or 'File'.
- File name (`file_name`, text, required): The name to give it, with its extension, for example notes.txt.
- Replace a file with the same name (`replace_existing`, true/false): Optional. On: a same-named file gets this as its new version. Off: the upload is renamed with a timestamp. Default: `false`.

**Outputs**: The uploaded file.

- `id` (text): The new file's id.
- `name` (text): The file's name in WorkDrive.
- `parent_id` (text): The folder it was uploaded to.
- `permalink` (text): The link that opens it in WorkDrive, when Zoho returns one.
- `size_in_bytes` (number): How many bytes were uploaded.

**Example output**

```json
{
  "id": "ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "name": "report.txt",
  "parent_id": "q6ix5d3a7f2d6c3b84a2d9e9e4c1f0a2b1c3e",
  "permalink": "https://workdrive.zoho.com/file/ojr4n2f1d5a74c0e94e7a8a1b5d2f3c9e0a12",
  "size_in_bytes": 28
}
```
