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 Make scenario, not in this documentation article) are mandatory!

Connecting the Box to Make

  1. Log in to your Box account, and add a module from the Box app into an Make scenario.

  2. Click Add next to the Connection field.

    61f26801b9037.gif
  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.

    61f26804039e9.png

The connection has been established.

Files

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:

  • File Copied

  • File Moved

  • File Renamed

  • File Downloaded

  • File Previewed

  • File Locked

  • File Unlocked

  • File TRashed

  • File Restored

  • File Deleted

  • Comment Created

  • Comment Updated

  • Comment Deleted

  • Task Created

  • Task Updated

  • Shared Link Created

  • Shared Link Updated

  • Shared Link Deleted

  • Metadata Instance Updated

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:

  • Only new files

  • New files and all changes

Limit

Set the maximum number of files Make should return during one execution cycle.

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.

Downloads a file.

Connection

Establish a connection to your Box account.

File ID

Select or map the File ID you want to download.

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.

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:

Can be downloaded

Select or map whether the the link allows downloading the files. This can only be set when access is set to open or company.

Can be Downloaded By

Select or map the option of the users who can download the files:

  • Open - Allows everyone to download the file

  • Company - Only the enterprise users can download the file

Access

Select or map the access of the file:

  • Open - Anyone with the link can access the file

  • Company - Only people within the company can access the file

  • Collaborators - Only those who have been invited can access the file

Password

Enter (map) the password required to access the shared link.

Unshared At

Enter (map) the date and time at which this shared link will expire. This field can only be set by users with paid accounts.

Tags

Enter (map) the tags for the file separated by a comma.

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.

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.

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:

  • Enterprise

  • Global

File

Select or map the file whose metadata you want to create.

Template

Select or map the metadata template and enter the template details.

Retrieves file metadata by its ID.

Connection

Establish a connection to your Box account.

Scope

Select or map the scope of the metadata:

  • Enterprise

  • Global

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.

Creates or updates metadata of a file.

Connection

Establish a connection to your Box account.

Scope

Select or map the scope of the metadata:

  • Enterprise

  • Global

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

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.

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:

  • Open - accepts emails from any email address

  • Collaborators - allows only registered emails for collaborators

Synchronization State

Select or map the folder synchronization status:

  • Synced

  • Not Synced

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.

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:

  • Open

  • Collaborations

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:

Access

Select or map the access of the shared link:

  • Open - Anyone with the link can access the folder contents

  • Collaborators - Only people within the company can access the folder

  • Company - Only people with invitations can access the folder

Password

Enter (map) the password required to access the shared link.

Unshared At

Enter (map) the date and time at which this shared link will expire. This field can only be set by users with paid accounts.

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.

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.

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:

  • Enterprise

  • Global

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.

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:

  • Enterprise

  • Global

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.

Updates folder's metadata.

Connection

Establish a connection to your Box account.

Scope

Select or map the scope of the folder metadata:

  • Enterprise

  • Global

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.

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:

  • ID

  • Name

  • Date

  • Size

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 Make should return during one execution cycle.

Other

Performs an arbitrary authorized API call.

Connection

Establish a connection to your Box account.

URL

Enter a path relative to https://api.box.com For example: /2.0/users/me

Note

For the list of available endpoints, refer to the Box API Documentation.

Method

Select the HTTP method you want to use:

GET

to retrieve information for an entry.

POST

to create a new entry.

PUT

to update/replace an existing entry.

PATCH

to make a partial entry update.

DELETE

to delete an entry.

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.

The following API call returns all the webhooks from your Box account:

URL:

/2.0/webhooks/

Method:

GET

61f2680519fa5.png

Matches of the search can be found in the module's Output under Bundle > Body > entries.

In our example, 7 webhooks were returned:

61f2680635746.png

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:

  • User Content

  • Scope Content

Type

Select or map the location in which you want to search the content:

  • File

  • Folder

  • Weblink

Sort

Select or map the option to sort the content:

  • Relevant

  • Modified At

Trash Content

Select or map the content you want to search:

  • Non-Trashed Only

  • Trashed Only

Query

Enter (map) the query to search the content that matches the specified query:

  • " " - wrap a query in double-quotes for an exact match

  • AND - return items that contain both the search terms

  • OR - return items that contain either of the search terms

  • NOT - return items that do not contain the search term

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 Make should return during one execution cycle.

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, useMessageinstead.

Troubleshooting

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 Make will try downloading the file again during the next execution of the scenario.

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 BoxTo 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:

61f268075bc1b.png
  • 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.

61f2680844fa3.png
  • 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.

61f2680945600.png

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.

61f2680a51a99.png
  • One way of configuring this module, as shown above. Include the file name with the extension. For example, invoice.xml.