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.
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.
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.
-
Navigate to the desired workflow in Integrations.
-
In the Integration Builder tab, locate the action that retrieves the .zip files you intend to attach.
-
Go to the Response tab and update the Payload Type to "attachment". Set the Attachment Format to "ZIP". Then click the Finish button.
-
Below this action, add another action. Under the System tab, select HTTPS File Upload.
-
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"]}
-
Below this action, add another action. Navigate to the OneTrust > Privacy Rights Automation tab and select PUT Updates an existing Request with a comment.
-
In the Response tab, click the Advanced View button in order to include a body.
-
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 }
-
Click the Finish button.
-
Click the Save button.
-
Click the Activate button to enable the workflow.