Skip to content

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

Connecting the Box to Ibexa Connect

  1. Log in to your Box account, and add a module from the Box app into an Ibexa Connect 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

New File Event

Triggers when selected actions occur on a file.

Webhook Name

Enter a name for the webhook.

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

Watch Files

Triggers when a new file is added or an existing file is updated in a folder being watched.

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

Get a File

Retrieves information about a file.

File Select or map the files whose details you want to retrieve.

Download a File

Downloads a file.

File ID Select or map the File ID you want to download.

Upload a File

Uploads a new file.

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.

Adds a shared link to a file.

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:

  • Open

  • Company

  • Collaborators

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.

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.

Rename a File

Renames a file.

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.

File Select or map the file you want to delete.

Create File Metadata Instance

Applies an instance of a metadata template to a file.

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.

Get File Metadata

Retrieves file metadata by its ID.

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.

Update File Metadata

Creates or updates metadata of a file.

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

New Folder Event

Triggers when selected actions occur on a folder.

Webhook Enter a name for the webhook.

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

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

Adds a new shared link to a folder.

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:

Can be downloaded

Select whether users with the link can download the files of the folder.

Access

Select or map the access of the shared link:

  • Open

  • Collaborators

  • Company

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.

Get a Folder

Retrieves information about a folder, including the first 100 entries in that folder.

Folder Select or map the Folder whose details you want to retrieve.

Update a Folder

Updates folder attributes.

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.

Rename a Folder

Renames a folder.

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.

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.

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.

Get Folder Metadata

Retrieves a folder metadata by its ID.

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.

Update Folder Metadata

Updates folder's metadata.

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.

Get Folder Items

Retrieves files, folders, and web links in a folder.

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

Other

Make an API Call

Performs an arbitrary authorized API call.

URL

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

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.

Example of Use - List Webhooks

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

Search for Content

Searches for items that are available to the user or an entire enterprise.

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

Retrieves information about a file/folder by a shared link.

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.

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

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 Ibexa Connect 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 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 a*gain.

61f2680a51a99.png

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