ByteChef LogoByteChef

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

NameLabelTypeDescriptionRequired
clientIdClient IdSTRINGtrue
clientSecretClient SecretSTRINGtrue

anl-c-box-md

Connection Setup

Follow these steps to connect Box to ByteChef using OAuth 2.0.

  1. Login to your Box account.
  2. Click on Dev Console in the bottom‑left corner.
  3. Click on Create Platform App.
  4. Select Custom App for an app type.
  5. Enter the name and select a purpose for your app. Click Next.
  6. Select User Authentication Method. Click Create App.
  7. Add the ByteChef OAuth redirect (callback) URL(s):
    • Cloud: https://app.bytechef.io/callback
    • Local development: http://localhost:5173/callback
  8. Select scopes for your app.
  9. Copy the Client ID and Client Secret.

Actions

Create Folder

Name: createFolder

Creates a new empty folder within the specified parent folder.

Properties

NameLabelTypeDescriptionRequired
nameFolder NameSTRINGThe name for the new folder.true
idParent Folder IDSTRINGID of the folder where the new folder will be created; if no folder is selected, the folder will be created in the root folder.true

Example JSON Structure

{
  "label" : "Create Folder",
  "name" : "createFolder",
  "parameters" : {
    "name" : "",
    "id" : ""
  },
  "type" : "box/v1/createFolder"
}

Output

Type: OBJECT

Properties

NameTypeDescription
typeSTRINGThis is always set to folder.
idSTRINGID of the new folder.
nameSTRINGName of the new folder.
parentOBJECT
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" : ""
  }
}

Download File

Name: downloadFile

Download a selected file.

Properties

NameLabelTypeDescriptionRequired
idParent Folder IDSTRINGID of the folder from which you want to download the file.false
fileIdFile IDSTRING
Depends On id
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

NameTypeDescription
extensionSTRING
mimeTypeSTRING
nameSTRING
urlSTRING

Output Example

{
  "extension" : "",
  "mimeType" : "",
  "name" : "",
  "url" : ""
}

Upload File

Name: uploadFile

Uploads a small file to Box.

Properties

NameLabelTypeDescriptionRequired
idParent Folder IDSTRINGID of the folder where the file should be uploaded; if no folder is selected, the file will be uploaded in the root folder.true
fileFile EntryFILE_ENTRYtrue

Example JSON Structure

{
  "label" : "Upload File",
  "name" : "uploadFile",
  "parameters" : {
    "id" : "",
    "file" : {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    }
  },
  "type" : "box/v1/uploadFile"
}

Output

Type: OBJECT

Properties

NameTypeDescription
entriesARRAY
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" : ""
    }
  } ]
}

Triggers

New File

Name: newFile

Triggers when file is uploaded to folder.

Type: DYNAMIC_WEBHOOK

Properties

NameLabelTypeDescriptionRequired
folderIdFolder IDSTRINGID of the folder in which file uploads will trigger this webhook.true

Output

Type: OBJECT

Properties

NameTypeDescription
typeSTRINGThis is always set to file.
idSTRINGID of the uploaded file.
nameSTRINGName of the uploaded file.
parentOBJECT
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

NameLabelTypeDescriptionRequired
folderIdFolder IDSTRINGID of the folder in which new folder will trigger this webhook.true

Output

Type: OBJECT

Properties

NameTypeDescription
typeSTRINGThis is always set to folder.
idSTRINGID of the new folder.
nameSTRINGName of the new folder.
parentOBJECT
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.

How is this guide?

Last updated on

On this page