Box Download

Description

The Box Download component allows you to download files from Box.

Output PayloadDescription
cv.PayloadIf payload is specified in the output property, it will be the downloaded file. If a file name is specified, the output payload of the previous component will be used. (pass-through)

Component Property

Property NameDescription
OutputPayload or File
Overwrite existing filesIf a file is specified in "Output Properties" and an existing file exists, a number is added to the file name when "Overwrite existing files" is off. Example "xxx (1).txt"
Specify methodSearch by file path and file name, by folder ID and file name, or by file ID ※2
Download only the most recent oneIf the search results target multiple files, download the most recent file or all of them
Target of retrievalWhen anything other than file ID is specified in "Specify method property", specify the Box file name with a full or partial match
Box folder pathIf folder path is specified in "Specify method property", specify the box folder path to download.
Box file nameIf file name is specified in "Specify method property", specify the Box file name to be downloaded.
File IDIf file ID is specified in "Specify method property", the file ID to be downloaded.
Get files modified after this timeDownload files modified after the specified time at the base time of downloading
Get files changed before this timeDownload files changed before the specified time at the base time of download
TimeoutHTTP request response timeout value
OAuth2 Client IDClient ID of API 2.0 from Box ※1
OAuth2 Client SecretSpecify Client Secret from Box ※1
OAuth2 Redirect URLSpecify Redirect URL from Box ※1
OAuth2 Access TokenPress the Get Token button to get the token. You can also update the token by pressing the Update button ※1 ※2

※1 See Box OAuth2 Setup for an example of OAuth2 settings in a box.

※2 "Specify method" property setting

When "Search by folder path and file name" is selected in the "Specify method" properties:

If the "Box folder path" property is not specified, all files (root) are targeted.

Even if "Partial match" is selected for the "Target" property, the "Box folder path" property is not subject to partial matching, so the file names in the folder specified by the "Box folder path" property will be searched for partial matches.

If the "Download only the most recent" property is checked, only the most recent file will be downloaded, even if the search results in multiple files. If not checked, all files will be downloaded.

If the "Box file name" property is not specified, files in the folder specified by the "Box folder path" property will be targeted (excluding subfolders).

If the "Box file name" property is specified, only files that match the search criteria by matching the "Target" property will be downloaded.

When "Search by folder ID and file name" is selected in the "Specify method" property:

If the "Folder ID" property is not specified, all files (root) are targeted.

The folder ID is a unique number assigned to a folder in the Box.

If the "Box file name" property is not specified, files in the folder specified by the "Folder ID" property will be targeted (excluding subfolders).

If the "Download only the most recent" property is checked, only the single most recent file will be downloaded even if multiple files are targeted by the search results. If not checked, all files will be downloaded.

If the "Box file name" property is not specified, files in the folder specified by the "Box folder path" property will be targeted (excluding subfolders).

If the "Box file name" property is specified, only files that match the search condition by the matching condition of the "Target" property will be downloaded.

When "Specify file ID" is selected for the "Specify method" property:

The file ID specified in the "File ID" property is a unique number assigned to the file, so only the corresponding file will be downloaded.

Component Variable

Component VariableDescription
cv.FileIDFile ID
cv.ReadLengthNumber of bytes of data to read
cv.FilenameName of the downloaded file if the "output" property is a filename

How to obtain an OAuth2 access token (※2)

Press the Get OAuth2 Access Token button to display the Get OAuth 2.0 Access Token panel. Press the Open Browser button to obtain the token. Once the token is obtained, press the Set button to automatically set it to the OAuth2 access token property.

oauth2-4en

In Gravio Studio for Windows, press the Open Browser button in the same way to obtain the token, but an error screen will appear. In this state, copy the URL from the address bar and press the Get button with that URL as the pace in the panel. Press the Set button to automatically set the token to the OAuth2 access token property.

oauth-gswin-1en

When you click the Open Browser button, the browser will automatically authenticate you. If necessary, please follow the instructions on the screen, including the login process.

oauth-gswin-2en

When authentication is complete, an error message "This page cannot be reached" will appear, so please copy the URL from the address bar at this time.

oauth-gswin-4en

Paste the copied URL into the panel and press the Get button to "Get OAuth2 Access Token". Press the Set button to close the panel.

Here are some example Use Cases:

Periodically retrieve and process files saved in a specific folder or with a specific file name in Box with Gravio

• Download sales data and processing logs such as CSV placed in a specific folder with a file name with date from Box and process them in Gravio.

Folder names can be multi-level folders.

• Upload audio data saved by mobile devices to Box, and Gravio periodically downloads the files and converts them to text using the OpenAIAudio component.

Similarly, image files can be retrieved and sent to the right person.

boxdownloaden