Uploading Files with HTTP Actions

You can upload files using multi-part, form-data via PUT or POST action/calls to any endpoint for generic systems which support file uploads. This ability is supported for any action whose account credentials are configured as the HTTP connector type.

Note:

Things to Know

  • File size limit: 2GB

  • Not supported for systems that require a binary file transfer (input stream)

  • OneTrust sends CSV files with capitalized file extensions by design (.CSV vs .csv). Ensure that you are accounting for the capitalization in your system integrations.

To configure the HTTP File Upload Action

The HTTP File Upload action will work with any file that has been created, uploaded, or downloaded via a prior action in the workflow.

  1. Click the Add icon to add another action.
  2. In the System tab, select HTTP File Upload.


  3. Select new or existing account credentials for the action, then click the Next button.
  4. In the Request tab, enter the Upload URL.
  5. Modify the following, as necessary:
    • Header(s)

    • File Reference

      Note:

      Select the ‘file’ variable from a prior action.

    • File Name

      Note:

      The File Name field, if left empty, will retrieve a UUID when called. You can optionally enter a custom name in this field for the integration to reference an intentional file name.

      If the file extension is omitted from the custom name, the call will populate the correct file type upon upload.

    • Form-Data Field(s)



  6. Click the Finish button.
  7. Click the Save button.
  8. Click the Activate button.

Attaching Files to Privacy Rights Requests

You can leverage integration workflows to attach files to privacy requests to help automate fulfillment. The following scenario will use .zip files as an example.

  1. Navigate to the desired workflow in Integrations.

  2. In the Integration Builder tab, locate the action that retrieves the .zip files you intend to attach.

  3. Go to the Response tab and update the Payload Type to "attachment". Set the Attachment Format to "ZIP". Then click the Finish button.



  4. Below this action, add another action. Under the System tab, select HTTPS File Upload.

  5. Complete the following fields, then click the Finish button.



    Fields
    Description
    Upload URL

    https://{YOUR-DOMAIN}.onetrust.com/api/document/v1/attachments/v2

    Method

    Select POST

    File Reference

    Click the plus sign (+) button and select the file object retrieved by the retrieval action. This will link the .zip file to the upload action.

    File Name

    Enter a name for the file. You can either hard-code the file name or pull the value from a field in the previous API response.

    Form-Data Fields

    In the key field, enter "attachment", and in the value field, provide a format object. For example: {"FileName": "Test_file.zip", "RefIds": ["01234"]}

  6. Below this action, add another action. Navigate to the OneTrust > Privacy Rights Automation tab and select PUT Updates an existing Request with a comment.

  7. In the Response tab, click the Advanced View button in order to include a body.

  8. In the body, pass a reference to the uploaded file to ensure it is linked in the request. Example body:

    JSON
    {  
        "attachments": [
         {     
            "fileName": "${(step.httpfileupload_0.FileName)!}",
            "fileId": "${(step.httpfileupload_0.Id)!}"   
         }  
        ],  
        "comment": "Test Comment",
        "internalComment": true
    }


  9. Click the Finish button.

  10. Click the Save button.

  11. Click the Activate button to enable the workflow.