<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
Multipart File Upload in Workflows (with Box Example)
Workflows
Okta Classic Engine
Okta Identity Engine

Overview

This guide will teach you how to upload a file to Box using multipart file upload in Okta Workflows.

Solution

Create Box app

Create a Box Limited Access App to upload a file to Box from the Box Developer Console.

    Create a new Boxdeveloper app.


    The app looks like this. Return to this app to set up Box authentication in Workflows.
     


    Box app.

    Upload file to Box flow

    The flow to upload a file to Box:
     


    Flow to upload a file to Box.

     

    Flow steps

    The flow has the following steps.

    1. Get the file to upload.
    2. Set up the file name and folder.
    3. Set up authentication.
    4. Upload the file.

     

    Get the file to upload

    In the first step, the File–Download card downloads a file from the internet. The flow will upload this file to Box. Use any other Workflows card that returns a File type.

     

    Set up the file name and folder

    The Object—Construct card sets the file name and folder where to upload the file. The folder ID is in the folder URL.
     


    Folder ID.

     

    Set up authentication

    In this step, the Object–Construct card creates the Authorization header. Find the token on the Configuration tab of the app:
     


    Box primary token.

     

    Upload the file

    In the last step, the File – Multipart Upload card uploads the file to Box.
     

     

    Allow the app user to upload files

    The Box developer app created has a Service Account ID (ends with @boxdevedition.com) listed in the General Settings tab. Share the folder where the file was uploaded with this account ID. Click Share in a folder to share and enter the Service Account ID email address.


    Service Account ID.

     

    Run the flow

    Run the flow to download the file from the internet and then upload it to Box.
     


    Running the flow to upload a file.


    The file on Box:
     


    Uploaded file on Box.

     

    Random file name and CSV file examples

    In this section, you will see two variations of the flow:

    • Generate a random file name before uploading.
    • Upload a CSV file.


    Generate a random file name before uploading

    Box will return an error if you try to upload a file with the same name. The following flow shows how to generate a random file name:
     


    Flow with a random file name.


    The file has z35nv_humans.txt format.


    Upload a CSV file

    This flow shows exporting a Workflows table to a CSV file and uploading the file to Box.

     


    Uploading a CSV file.

    Related References

     

     

     

    Recommended content

    Loading
    Multipart File Upload in Workflows (with Box Example)