
In this article we will explain an automated process associated with Box.
Box is a cloud storage service provided by Box Inc. You can use it for personal use, or you can create shared folders for multiple people to use. You can also use its API to perform various operations, and the automated Tasks we’ll discuss here are based on its API.
For more information about Box, please refer to the official Box Support page.
About each automated Task
Automatic Tasks related to Box include Upload File, Copy File, Create Folder, Search Folder, Create Shared Link to Folder, and Delete Folder. In this page, we will focus on four of them: Create Folder, Upload File, Create Shared Link to Folder and Delete Folder.
First, we’ll briefly explain each Task.
Box: Create Folder

Specify a folder on Box and create a new folder in it. You can save the created folder’s ID and URL in Data Items.
Box: Upload File

Upload a file to Box. You can specify the files to be uploaded in a File-type Data Item. By setting multiple files in a File-type Data Item you can simultaneously upload multiple files. You can specify the destination of the uploaded files with a Folder ID. If you don’t, the files are uploaded to the root folder of the User who uploads them. You can also save the URL of the uploaded file in a Data Item.
Box: Create Shared Link to Folder

Specify the folder you want to share on Box and generate a shared link. You can add Data Items to set an expiration date and password.
Box: Delete Folder

Specify folders on Box to be deleted. You can delete multiple folders at once by using a String-Type (multiple lines) Data Item, in which case you should write one ID per line.
To use these automatic Tasks, it is necessary to obtain a token linked to the Box account from the OAuth2 Settings button in the Service Task. Follow the steps below to set it up.
How to Integrate Box with Questetra
In the Box Tasks select the OAuth2 Settings button under C1: OAuth2 Settings Name.

Next, click the Add button and enter a suitable name in the “Name” field. It is recommended that you use something like “Connect with {account name of Box}” so that you can easily identify the account to which it is connected.

If you click the Get Token button the login screen to your Box account will be displayed (but if you have already logged in to Box via the browser you are using, only the “Grant access to Box” screen will be displayed).

Enter your Box account (email address) and password, log in, and click “Grant access to Box”.

If the authentication is successful we will return to the OAuth2 configuration page in Questetra and “o (Refresh token)” will be displayed in the “Have a Token?” field.
Sample App

This app is for sending files to people outside the company. The method is to upload a file to a dedicated folder created in Box and share the folder. The URL of the folder is set to be shared with people outside the company by email. Also, the folder and the files in it are set to be deleted a day after it is created. This method is used for files which are too large to be sent by email or when there are multiple files in a folder.
Data Item Name | Data-type | Required | File Attachment Task | Confirmation of shared link Task | Description |
---|---|---|---|---|---|
Title | – | – | Editable | Display only | The Title of the Process. |
ID of the shared folder | String-type (single line) | – | No display | No display | Save the folder ID created in the Create Folder Task. |
Shared Link URL | String-type (single line) | – | No display | Display only | Save the shared URL of the folder created in the Create Shared Link to Folder Task. |
Upload file | File-type | Yes | Editable | Display only | Save the file to be uploaded and shared. |
First, specify the file to be shared in the “File Attachment” Task. In the following “Create Folder” Task (see Box: Create Folder) create a folder to be shared on Box.
Item name | Required | Description |
---|---|---|
C1: OAuth2 Setting Name* | Yes | To specify OAuth2 settings to connect to Box. In the OAuth2 settings, you need to get a token beforehand (see “How to Integrate Box with Questetra”). |
C2: Parent Folder ID | – | To specify in which folder you want to create the new folder using the ID. Let’s leave it blank this time and specify the root folder. |
C3: Folder Name to create* | Yes | To specify the name of the folder to be created:let’s use “#{processInstanceId}” this time. The “#{processInstanceId}” part will contain the process ID, so that there will be no duplication with other folders created by this App. |
C4: String type data Item that will save Folder ID | – | To specify the Data Item for saving the generated folder ID: this time, specify the ID of the created folder. |
C5: String type data Item that will save Folder ID | – | To specify the Data Item for saving the URL of the generated file. Not specified this time. |
Next, upload the specified file to the created folder.
Item name | Required | Description |
---|---|---|
C1: OAuth2 Setting Name* | Yes | To specify OAuth2 settings to connect to Box. In the OAuth2 settings you need to get a token beforehand (see “How to Integrate Box with Questetra”). |
C2: File type data item whose attached files will be uploaded* | Yes | To specify the Data Item that contains the file to be uploaded: specify “Upload File” this time. |
C3: Folder ID that files will be uploaded (Root folder if blank) | – | To specify the ID of the folder to save the uploaded file: this time, specify “#{#q_folder_id}” which is the Field Name of the “Upload File” data item. |
C4: String type data item that will save uploaded file ids | – | To specify the Data Item for saving the ID of the uploaded file. It is not used this time. |
C5: String type data item that will save uploaded file urls | – | To specify the Data Item for saving the URL of the uploaded file. It is not used this time. |
When you have completed the settings, proceed to the Create Shared Link to Folder Task, where you can create a shared link from the ID of the created folder.
Item name | Required | Description |
---|---|---|
C1: OAuth2 Setting Name* | Yes | To specify OAuth2 settings to connect to Box. In the OAuth2 settings, you need to get a token beforehand (see “How to Integrate Box with Questetra”). |
C2: Folder ID to share* | Yes | To specify the ID of the folder to be shared. Select “ID of the shared folder” from “Insert reference…”. |
C3: Date Time type data Item with Expiration of the Link | – | To specify the expiration date of the shared link in a Datetime-type Data Item: it is not used this time. |
C4: String type data Item with Password of the Link | – | Specifies the password for the shared link in a String-type Data Item. Not used in this case. |
C5: String type data Item that will save web the Shared Link* | – | To specify a Data Item for saving the generated shared link: this time, specify “Shared Link URL”. |
After completing the settings proceed to the Shared Link Confirmation Task. In this Task check the URL in the Shared Link URL and tell the person you are sharing it with about the URL. Since there are no informing functions included in the app please do it by email or add an automatic sending Task.
Once confirmed, proceed to the Timer Intermediate Event.
Item name | Description |
Datetime specified by Data Item | To specify the date and time to proceed to the next Data Item. It’s not used this time. |
Datetime specified by an expression | To specify the date and time to proceed with an expression. This time the expression “presenceInstanceStartDatetime.addDays(1)” is used. |
This will allow you to wait until one day after you start the process. The receiving party should receive the file during this time.
※ Related Manual: M223: Automatically Sleep for a Specified Period During A Process
After one day, the folder will be deleted in the Delete Folder Task (see Box: Delete Folder).
Item name | Required | Description |
---|---|---|
C1: OAuth2 Setting Name* | Yes | To specify OAuth2 settings to connect to Box. In the OAuth2 settings you need to get a token beforehand (see “How to Integrate Box with Questetra”). |
C2: Data Item with folder IDs to delete* | Yes | To specify the Data Item containing the ID of the folder to be deleted: this time, specify the ID of the folder to be shared. |
Once the folder is deleted the entire process is complete.
That’s all for today.
Pingback: Process Start Triggered by a File Upload to Box – Questetra Support
Pingback: Box: Create Folder – Questetra Support
Pingback: Box: Upload File – Questetra Support
Pingback: Box: Create Shared Link to Folder – Questetra Support
Pingback: Box: Delete Folder – Questetra Support