Box
Comprehensive guide to the Box integration in StackAI: discover key actions, input/output details, and best practices for automating file and folder management.
What is Box?
Box is a leading cloud content management and file sharing service for businesses. The Box integration in StackAI allows you to automate, manage, and interact with your Box files, folders, metadata, and user permissions directly within your workflows. This enables seamless collaboration, secure file storage, and efficient document handling without leaving the StackAI platform.
How to use it?
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.
Example of Usage
Scenario: Automatically upload a file to a specific Box folder when a new document is generated in your workflow.
Add the Box node to your StackAI workflow.
Select the "Upload File" action.
Configure the required inputs:
file (Required): The file to upload (e.g., from a previous node).
parent_folder_id (Required): The ID of the Box folder where the file will be uploaded.
Optionally, set configurations such as connection ID for authentication.
Use the output (uploaded file details) in downstream nodes for further processing or notifications.
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:
{
"file": "{doc-0}",
"parent_folder_id": "123456789",
"name": "report.pdf"
}
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:
{
"file_id": "987654321"
}
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:
{
"name": "Project Files",
"parent_folder_id": "123456789"
}
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:
{
"folder_id": "123456789"
}
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:
{
"file_id": "987654321",
"access": "open"
}
Last updated
Was this helpful?