Box File Utilities

Overview

Provides Smart Services and custom functions to integrate Appian with Box document management

Key Features & Functionality

Custom Functions

  • Create JSON Web Token (JWT) - createtoken() provides the user with a JWT that can be used for up to 60 seconds as authentication with the Box “token” API
  • Construct URL Custom Function - constructboxurl() expression function facilitates the creation of a servlet download link
  • Generate Box URL - generateboxurl() calls box url and intercepts the redirect url. It requires a valid Client Credentials Grant authorization token.

Smart Services

  • File Upload - after obtaining a JWT, this smart service uses the access token and calls the file upload API passing in the contents of a provided Appian Document
  • File Download to Appian - this smart service can download a file from Box and store it in a provided Appian Knowledge Center or Folder
    Servlet
  • File Download - downloads a file directly to the browser for the user to view/save to their computer. For security reasons most of the parameters passed to the servlet are obfuscated. Use the "constuctboxurl" function to create a URL to access the servlet securely.

Please see the Box File Utilities guide included with the download for complete setup and usage instructions.

Anonymous
Parents
  • Hello,

    I am trying to get the Box File Upload smart service to work properly.  I configured my BOX application exactly how it was done in the instructions, and was able to generate an access token using createtoken(). 
    However, upon running that file upload node, nothing happens. Inspecting the system logs yeilds an Error 401 with a Null response from box.

    Do you have any help/ideas where to proceed from here?

  • Hi,
    Assuming 

    that you verified your JWT token, you can now use that to generate Access token that you can use to manipulate data on the box account.

    1. You will need to create an Integration smart service, which queries the data with a post request. The curl of thre request as follows.
    curl -X POST \
    
    api.box.com/.../token \
    
    -H 'Content-Type: application/x-www-form-urlencoded' \
    
    -H 'Host: api.box.com' \
    
    -d 'grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&client_id=ENTER_JWT_TOKEN_HERE'
    
    1. Once you get the response, you want to grab the following value result.body.access_token
    2. In your smart service Node, open Data and wherever it asks for "token", you want to pass the value received from Accesstoken

    This should enable you to download the files.

Comment
  • Hi,
    Assuming 

    that you verified your JWT token, you can now use that to generate Access token that you can use to manipulate data on the box account.

    1. You will need to create an Integration smart service, which queries the data with a post request. The curl of thre request as follows.
    curl -X POST \
    
    api.box.com/.../token \
    
    -H 'Content-Type: application/x-www-form-urlencoded' \
    
    -H 'Host: api.box.com' \
    
    -d 'grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&client_id=ENTER_JWT_TOKEN_HERE'
    
    1. Once you get the response, you want to grab the following value result.body.access_token
    2. In your smart service Node, open Data and wherever it asks for "token", you want to pass the value received from Accesstoken

    This should enable you to download the files.

Children
No Data