Box
The Box modules allow you to monitor a specified folder for file changes, modify and delete existing files, and upload new files to a folder from your Box account.
Getting Started with Box
Prerequisites
- A Box account - create an account at box.com/.
The module dialog fields that are displayed in bold (in the Integromat scenario, not in this documentation article) are mandatory!
Connecting the Box to Integromat
1. Log in to your Box account, and add a module from the Box app into an Integromat scenario.
2. Click Add next to the Connection field.
3. In the Connection name field, enter a name for the connection and click Continue.
4. Confirm the access by clicking Grant access to Box.
The connection has been established.
Files
New File Event
Triggers when selected actions occur on a file.
Webhook Name | Enter a name for the webhook. |
Connection | Establish a connection to your Box account. |
File | Select or map the file whose events you want to watch. |
Triggers | Select or map the events you want to watch:
|
Watch Files
Triggers when a new file is added or an existing file is updated in a folder being watched.
Connection | Establish a connection to your Box account. |
Watch in Folder | Select or map the folder whose files you want to watch. |
Watch | Select or map the files you want to watch:
|
Limit | Set the maximum number of files Integromat should return during one execution cycle. |
Get a File
Retrieves information about a file.
Connection | Establish a connection to your Box account. |
File | Select or map the files whose details you want to retrieve. |
Download a File
Downloads a file.
Connection | Establish a connection to your Box account. |
File ID | Select or map the File ID you want to download. |
Upload a File
Uploads a new file.
Connection | Establish a connection to your Box account. |
Upload to Folder | Select or map the folder in which you want to upload the file. |
File Name | Enter (map) the file name including the file extension. |
Data | Enter (map) the file data. |
Add a Shared Link to a File
Adds a shared link to a file.
Connection | Establish a connection to your Box account. |
File | Select or map the file to which you want to add a shared link. |
Access | Select or map the access level for hte link:
|
Password | Enter (map) the password set for the file. |
Can Download | Select whether the users with this link can download the file. |
Unshared at | Enter (map) the date after which the link is unavailable. |
Vanity Name | Enter (map) the vanity name. |
Update a File
Updates file attributes.
Connection | Establish a connection to your Box account. | ||||||||||||||
File ID | Select or map the File ID whose details you want to update. | ||||||||||||||
Name | Enter (map) a name for the file. | ||||||||||||||
Description | Enter (map) the details of the file. | ||||||||||||||
Move to Folder | Select or map the folder to which you want to move the file. | ||||||||||||||
Shared Link | Add the information about the shared link:
|
Rename a File
Renames a file.
Connection | Establish a connection to your Box account. |
File ID | Select or map the File ID whose details you want to update. |
Name | Enter (map) a name for the file. |
Delete a File
Deletes a file or moves it to trash.
Connection | Establish a connection to your Box account. |
File | Select or map the file you want to delete. |
Create File Metadata Instance
Applies an instance of a metadata template to a file.
Connection | Establish a connection to your Box account. |
Scope | Select or map the scope of the metadata:
|
File | Select or map the file whose metadata you want to create. |
Template | Select or map the metadata template and enter the template details. |
Get File Metadata
Retrieves file metadata by its ID.
Connection | Establish a connection to your Box account. |
Scope | Select or map the scope of the metadata:
|
File | Select or map the file whose metadata details you want to retrieve. |
Template | Select or map the metadata template whose details you want to retrieve. |
Update File Metadata
Creates or updates metadata of a file.
Connection | Establish a connection to your Box account. |
Scope | Select or map the scope of the metadata:
|
File | Select or map the file whose metadata you want to update. |
Template | Select or map the metadata template and enter the template details. |
Folders
New Folder Event
Triggers when selected actions occur on a folder.
Webhook | Enter a name for the webhook. |
Connection | Establish a connection to your Box account. |
Folder | Select or map the folder whose events you want to watch. |
Trigger | Select or map the events you want to watch. |
Create a Folder
Creates a new empty folder within the specified parent folder.
Connection | Establish a connection to your Box account. |
Name | Enter (map) a name for the folder. |
Parent Folder | Select or map the parent folder in which you want to create the folder. |
Folder Upload Email Address | Select or map the option for the email addresses for uploading files to the folder:
|
Synchronization State | Select or map the folder synchronization status:
|
Add a Shared Link to a Folder
Adds a new shared link to a folder.
Connection | Establish a connection to your Box account. | ||||||||
File ID | Select or map the File ID whose details shared link you want to add to the folder. | ||||||||
Name | Enter (map) a name for the file. | ||||||||
Description | Enter (map) the details of the file. | ||||||||
Move to Folder | Select or map the folder to which you want to move the file. | ||||||||
Shared Link | Add the information about the shared link:
|
Get a Folder
Retrieves information about a folder, including the first 100 entries in that folder.
Connection | Establish a connection to your Box account. |
Folder | Select or map the Folder whose details you want to retrieve. |
Update a Folder
Updates folder attributes.
Connection | Establish a connection to your Box account. | ||||||
Folder | Select or map the Folder whose details you want to update. | ||||||
Can Non-Owners Invite | Select whether the users who are non-owners can invite members to the folder. | ||||||
Can Non Owners View Collaborators | Select whether the users who are not the owner of the folder can view the folder content collaborations. | ||||||
Collections | Add the collections to the folder. | ||||||
Description | Enter (map) the details of the folder. | ||||||
Folder Upload Email Access | Select or map the access level of the folder:
| ||||||
Is Collaboration Restricted To Enterprise | Select whether the folder collaboration is only for the enterprise. | ||||||
Name | Enter (map) a new name for the folder. | ||||||
Move to Folder | Select or map the Folder ID to which you want to move this folder. | ||||||
Shared Link | Add the folder shared link properties:
|
Rename a Folder
Renames a folder.
Connection | Establish a connection to your Box account. |
Folder | Select or map the Folder you want to rename. |
Name | Enter (map) the new name of the folder. |
Delete a Folder
Deletes a folder, either permanently or by moving it to trash.
Connection | Establish a connection to your Box account. |
Folder | Select or map the folder you want to delete. |
Delete the folder's content too. | Select whether you want to delete the folder and folder contents. |
Create Folder Metadata Instance
Applies an instance of a metadata template to a folder.
Connection | Establish a connection to your Box account. |
Scope | Select or map the scope of the folder metadata:
|
Folder | Select or map the Folder whose metadata instance you want to create. |
Template | Select or map the metadata template and enter the details to create the metadata. |
Get Folder Metadata
Retrieves a folder metadata by its ID.
Connection | Establish a connection to your Box account. |
Scope | Select or map the scope of the folder metadata whose details you want to retreive:
|
Folder | Select or map the Folder whose metadata details you want to retreive. |
Template | Select or map the metadata template whose details you want to retreive. |
Update Folder Metadata
Updates folder's metadata.
Connection | Establish a connection to your Box account. |
Scope | Select or map the scope of the folder metadata:
|
Folder | Select or map the Folder whose metadata instance you want to update. |
Template | Select or map the metadata template and enter the details to update the metadata. |
Get Folder Items
Retrieves files, folders, and web links in a folder.
Connection | Establish a connection to your Box account. |
Folder | Select or map the folder whose items information you want to retreive. |
Sort By | Select or map the option to sort the items:
|
Sort Direction | Select or map the order in which you want to arrange the items. For example, Ascending . |
Limit | Set the maximum number of folder items Integromat should return during one execution cycle. |
Other
Make an API Call
Performs an arbitrary authorized API call.
Connection | Establish a connection to your Box account. |
URL | Enter a path relative to For the list of available endpoints, refer to the Box API Documentation. |
Method | Select the HTTP method you want to use: GET POST PUT PATCH DELETE |
Headers | Enter the desired request headers. You don't have to add authorization headers; we already did that for you. |
Query String | Enter the request query string. |
Body | Enter the body content for your API call. |
Example of Use - List Webhooks
The following API call returns all the webhooks from your Box account:
URL:/2.0/webhooks/
Method:GET
Matches of the search can be found in the module's Output under Bundle > Body > entries.
In our example, 7 webhooks were returned:
Search for Content
Searches for items that are available to the user or an entire enterprise.
Connection | Establish a connection to your Box account. |
Scope | Select or map the content you want to search:
|
Type | Select or map the location in which you want to search the content:
|
Sort | Select or map the option to sort the content:
|
Trash Content | Select or map the content you want to search:
|
Query | Enter (map) the query to search the content that matches the specified query:
|
Parent Folder IDs | Add the Parent Folder IDs whose content you want to search. |
Content Types | Select or map the content type you want to search. |
Created Range From | Enter (map) the start date to search the content that was created on or after the specified date. |
Create Range To | Enter (map) the start date to search the content that was created on or before the specified date. |
Updated Range From | Enter (map) the start date to search the content that was updated on or after the specified date. |
Updated Range To | Enter (map) the start date to search the content that was updated on or before the specified date. |
Fields | Add the list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response. Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified. |
File Extensions | Enter (map) the file extensions separated by a comma that you want to search. For example, .png , .pdf . |
Size From | Enter (map) the minimum file size in bytes you want to search. |
Size To | Enter (map) the maximum file size in bytes you want to search. |
Owner User IDs | Enter (map) the Owner ID separated by comma whose content items you want to list. For example, 123,654 . |
Limit | Set the maximum number of content items Integromat should return during one execution cycle. |
Get a File/Folder by Shared Link
Retrieves information about a file/folder by a shared link.
Connection | Establish a connection to your Box account. |
Shared Link URL | Enter (map) shared link URL address whose file or folder details you want to retrieve. |
Password | Enter (map) the link password. |
Create a Comment
Creates a new comment to a file.
Connection | Establish a connection to your Box account. |
File | Select or map the file to which you want to add the comment. |
Message | Enter (map) the comment text. |
Tagged Message | Enter (map) the text of the comment, including @[user_id:name] somewhere in the message to mention another user. If you are not mentioning another user, use Message instead. |
Troubleshooting
Watch files trigger did not download a file contained in the folder.
There are several situations when downloading a file fails:
- The current file lock settings do not allow the file to be downloaded or the downloading of the file is disabled. In this case, the file is ignored.
- When the scenario started, the file was being uploaded to the server and was not ready to be downloaded. The scenario run gets stopped and Integromat will try downloading the file again during the next execution of the scenario.
Unable to upload or update a file
There are several situations when uploading or updating a file fails:
- The uploaded file is too big and exceeds the maximum file size limit for your Box plan, or you have used all of your Box account's storage quota. To get more storage space, delete existing files from Box or upgrade your Box account.
- Box does not allow you to upload any two files with the same name to one single folder. If the destination folder contains a file with the same name as the file being uploaded, the scenario run terminates with an error. The solution is simply to rename the file. If you aim to update the file, use the Update a file module.
Tips
Automatically rename two uploaded files with the same name in Box
To automatically rename each file with a unique name you will need to adjust the scenario as shown below.
The overall way that the scenario is supposed to look is as:
- You will need to connect the Ignore error handler: This means if a file exists with the same name in Box then instead of the scenario failing and stopping, the error will be ignored.
- Once you have added the ignore error handler the next step is to add the increment module which is used to uniquely identify files that have the same name. Drag and place the increment module between the Box Upload a File module and the Ignore error handler module.
Once done, configure the module.
- The next step is to clone and the Upload a file module will save you from remapping it again and then add the Upload a file module in between the Tools-Increment function module and the Ignore error handler again.
- One way of configuring this module, as shown above. Include the file name with the extension. For example, invoice.xml.