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.
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:
Copy
Ask AI
// Trigger the "File Upload" WorkflowPOST 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 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
Copy
Ask AI
POST /projects/<Your Project ID>/sdk/triggers/<Workflow ID> HTTP/1.1Host: zeus.useparagon.comAuthorization: Bearer <Paragon User Token>Content-Length: <Length>Content-Type: multipart/form-data; boundary=----12345------12345Content-Disposition: form-data; name="paragon-file"; filename="1efc9f67-5758-4ab0-9b0e-2484e5900ae4"Content-Type: <Content-Type header here>(data)------12345--
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!