Box
Comprehensive guide to the Box integration in StackAI: discover key actions, input/output details, and best practices for automating file and folder management.
To use the Box integration in StackAI, add the Box node to your workflow. You can then select from a wide range of actions to interact with your Box account, such as uploading files, managing folders, sharing documents, and handling metadata. Each action can be configured with specific inputs and settings to match your automation needs.
Establishing a Connection to Box
Box OAuth2
Selecting the Box OAuth2 allows you to connect directly to your Box user account using StackAI's OAuth app. Sign in to Box and your Box connection will be automatically established.
Box JSON Web Token
JWT (JSON Web Token) is a secure way for our platform to talk directly to your Box account without requiring a specific person to stay logged in. This type of connection connects directly to a Box service account unique to your organization. To set up this type of connection, visit the Box Developer Console.
Select New App in the top right corner, then name your app and select JWT.

Under Configuration, make sure you have the following:
Read all files
Write all files
If you plan to impersonate a user, additionally add the following scopes:
App + Enterprise Access
Make API calls using the as-user header
Then Generate a Public/Private Keypair.
Once your new app is configured, save your changes.
Go to the Authorization tab and click Review and Submit. Once your app is reviewed, it should be ready to use in StackAI.
Establishing a Connection
Under the Configuration tab of your App, go to App Settings and Download as JSON. This file will contain everything you need to create a connection.
Inside StackAI, create a new connection by selecting + New Connection. Go to Box -> Box (JWT) and fill in the fields with the data in your .json file.

Most Commonly Used Actions in Box
Below are the most frequently used Box actions in StackAI, along with their input, configuration, and output details:
1. Upload File
Description: Uploads a file to a specified folder in your Box account.
Inputs:
file (Required): The file object or path to upload.
parent_folder_id (Required): The ID of the destination folder in Box.
name (Optional): The name for the uploaded file.
Configurations:
connection_id (Required): Your Box connection for authentication.
Outputs:
id: The unique ID of the uploaded file.
name: The name of the uploaded file.
created_at: Timestamp of file creation.
modified_at: Timestamp of last modification.
size: File size in bytes.
Example:
2. Download File
Description: Downloads a file from Box using its file ID.
Inputs:
file_id (Required): The ID of the file to download.
Configurations:
connection_id (Required): Your Box connection for authentication.
Outputs:
file_content: The binary content of the downloaded file.
Example:
3. Create Folder
Description: Creates a new folder in a specified parent folder.
Inputs:
name (Required): The name of the new folder.
parent_folder_id (Required): The ID of the parent folder.
Configurations:
connection_id (Required): Your Box connection for authentication.
Outputs:
id: The unique ID of the new folder.
name: The name of the new folder.
Example:
4. List Folder Items
Description: Lists all items (files and folders) within a specified folder.
Inputs:
folder_id (Required): The ID of the folder to list items from.
Configurations:
connection_id (Required): Your Box connection for authentication.
Outputs:
entries: Array of items (files/folders) in the folder.
total_count: Total number of items.
Example:
5. Share File or Folder (Get Shared Link)
Description: Generates a shared link for a file or folder.
Inputs:
file_id or folder_id (Required): The ID of the file or folder to share.
access (Optional): Access level (e.g., "open", "company", "collaborators").
Configurations:
connection_id (Required): Your Box connection for authentication.
Outputs:
shared_link: The generated URL for sharing.
Example:
Last updated
Was this helpful?

