Box
Box is a cloud content management and file sharing service that enables businesses to securely store, manage, and collaborate on documents.
Categories: File Storage
Type: box/v1
Connections
Version: 1
OAuth2 Authorization Code
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| clientId | Client Id | STRING | true | |
| clientSecret | Client Secret | STRING | true |
![]()
Connection Setup
Follow these steps to connect Box to ByteChef using OAuth 2.0.
- Login to your Box account.
- Click on Dev Console in the bottom‑left corner.
- Click on Create Platform App.
- Select Custom App for an app type.
- Enter the name and select a purpose for your app. Click Next.
- Select User Authentication Method. Click Create App.
- Add the ByteChef OAuth redirect (callback) URL(s):
- Cloud:
https://app.bytechef.io/callback - Local development:
http://localhost:5173/callback
- Cloud:
- Select scopes for your app.
- Copy the Client ID and Client Secret.
Actions
Create Folder
Name: createFolder
Creates a new empty folder within the specified parent folder.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| name | Folder Name | STRING | The name for the new folder. | true |
| id | Parent Folder ID | STRING | ID of the folder where the new folder will be created. The root folder is always represented by the ID 0. | true |
Example JSON Structure
{
"label" : "Create Folder",
"name" : "createFolder",
"parameters" : {
"name" : "",
"id" : ""
},
"type" : "box/v1/createFolder"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| type | STRING | This is always set to folder. |
| id | STRING | ID of the new folder. |
| name | STRING | Name of the new folder. |
| parent | OBJECT Properties{STRING(type), STRING(id), STRING(name)} | Folder that new folder is located within. This value may be null for some folders such as the root folder or the trash folder. |
Output Example
{
"type" : "",
"id" : "",
"name" : "",
"parent" : {
"type" : "",
"id" : "",
"name" : ""
}
}Find Folder ID
To find the Folder ID, click here.
Download File
Name: downloadFile
Download a selected file.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| id | Parent Folder ID | STRING | ID of the folder from which you want to download the file. The root folder is always represented by the ID 0. | false |
| fileId | File ID | STRING Depends Onid | ID of the file to download. | true |
Example JSON Structure
{
"label" : "Download File",
"name" : "downloadFile",
"parameters" : {
"id" : "",
"fileId" : ""
},
"type" : "box/v1/downloadFile"
}Output
Type: FILE_ENTRY
Properties
| Name | Type | Description |
|---|---|---|
| extension | STRING | |
| mimeType | STRING | |
| name | STRING | |
| url | STRING |
Output Example
{
"extension" : "",
"mimeType" : "",
"name" : "",
"url" : ""
}Find File ID
To find the File ID, click here.
Find Folder ID
To find the Folder ID, click here.
Upload File
Name: uploadFile
Uploads a small file to Box.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| id | Parent Folder ID | STRING | ID of the folder where the file should be uploaded. The root folder is always represented by the ID 0. | true |
| file | File Entry | FILE_ENTRY | true |
Example JSON Structure
{
"label" : "Upload File",
"name" : "uploadFile",
"parameters" : {
"id" : "",
"file" : {
"extension" : "",
"mimeType" : "",
"name" : "",
"url" : ""
}
},
"type" : "box/v1/uploadFile"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| entries | ARRAY Items[{STRING(type), STRING(id), STRING(name), {STRING(type), STRING(id), STRING(name)}(parent)}] | A list of files that were uploaded. |
Output Example
{
"entries" : [ {
"type" : "",
"id" : "",
"name" : "",
"parent" : {
"type" : "",
"id" : "",
"name" : ""
}
} ]
}Find Folder ID
To find the Folder ID, click here.
Triggers
New File
Name: newFile
Triggers when file is uploaded to folder.
Type: DYNAMIC_WEBHOOK
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| folderId | Folder ID | STRING | ID of the folder to monitor for new files. The root folder is always represented by the ID 0. | true |
Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| type | STRING | This is always set to file. |
| id | STRING | ID of the uploaded file. |
| name | STRING | Name of the uploaded file. |
| parent | OBJECT Properties{STRING(type), STRING(id), STRING(name)} | Folder that uploaded file is located within. This value may be null for some folders such as the root folder or the trash folder. |
JSON Example
{
"label" : "New File",
"name" : "newFile",
"parameters" : {
"folderId" : ""
},
"type" : "box/v1/newFile"
}New Folder
Name: newFolder
Triggers when folder is created.
Type: DYNAMIC_WEBHOOK
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| folderId | Folder ID | STRING | ID of the folder to monitor for new folders. The root folder is always represented by the ID 0. | true |
Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| type | STRING | This is always set to folder. |
| id | STRING | ID of the new folder. |
| name | STRING | Name of the new folder. |
| parent | OBJECT Properties{STRING(type), STRING(id), STRING(name)} | Folder that new folder is located within. This value may be null for some folders such as the root folder or the trash folder. |
JSON Example
{
"label" : "New Folder",
"name" : "newFolder",
"parameters" : {
"folderId" : ""
},
"type" : "box/v1/newFolder"
}What to do if your action is not listed here?
If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.
To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.
Additional Instructions
How to find File ID
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL https://*.app.box.com/files/123 the file_id is 123 .
The File ID can also be found in the output of the following actions and triggers:
- Upload File
- New File trigger
How to find Folder ID
To find a Box folder ID, open the folder in your web browser and copy the numeric string at the end of the URL (e.g., in app.box.com/folder/12345, the ID is 12345).
The Folder ID can also be found in the output of the following actions and triggers:
- Create Folder
- New Folder trigger
How is this guide?
Last updated on