Overview

Paragon offers multiple ways to manage files within your workflows, enabling features like sending email attachments and retrieving or uploading files from storage providers such as Google Drive.

Sending Files to Paragon

Hex Encoded Data

You can pass in hex encoded data in as a Paragon File Object to either an App Event or Request Trigger to be handled in the workflow. Here’s an example file object structure:

// Trigger the "File Upload" Workflow
POST https://zeus.useparagon.com/projects/<Paragon Project ID>/sdk/triggers/<Workflow ID>

Authorization: Bearer <Paragon User Token>
Content-Type: application/json

// Body

{
	"name": "test.txt", // File name
	"data": "5468697320697320612073616d706c6520746578742e", // hex encoded data string
	"mimeType": "text/plain", // File type and subtype
	"dataType": "FILE" // Paragon specific property
}

multipart/form-data

multipart/form-data is a MIME encoding type used for sending binary data, like files, and text data in a single HTTP request. It can also be submitted as a POST request to a Request Trigger

POST /projects/<Your Project ID>/sdk/triggers/<Workflow ID> HTTP/1.1
Host: zeus.useparagon.com

Authorization: Bearer <Paragon User Token>
Content-Length: <Length>
Content-Type: multipart/form-data; boundary=----12345

------12345
Content-Disposition: form-data; name="paragon-file"; filename="1efc9f67-5758-4ab0-9b0e-2484e5900ae4"
Content-Type: <Content-Type header here>

(data)
------12345--

Usage

Workflows

You can send files to a workflow App Event or Request Triggers. Set up your Request Trigger with test data by defining the parameters or sending a test request to the provided test endpoint:

Paragon File Object used as test data

After you’ve received the file object in the test data, you can reference the object in any of your workflow steps to be uploaded using a dropdown like the Google Drive File Upload action shown here:

Or use our Dynamic Variables to reference the file to POST to an upload endpoint of your choosing!

Was this page helpful?