> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useparagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Working with Files

## 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](/workflows/triggers/app-events) or [Request](/workflows/triggers/request-trigger) Trigger to be handled in the workflow. Here’s an example file object structure:

```http theme={null}
// 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](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) 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

```http theme={null}
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](/workflows/triggers/app-events) or [Request Triggers](/workflows/triggers/request-trigger). Set up your Request Trigger with [test data](/workflows/building-workflows#testing-workflows) by defining the parameters or sending a test request to the provided test endpoint:

<Frame caption="Paragon File Object used as test data">
  <img src="https://mintcdn.com/paragon/p_CuCy_equ6Xxvlm/assets/file-upload-example.png?fit=max&auto=format&n=p_CuCy_equ6Xxvlm&q=85&s=2c790dfe04428bf2b113f2b3d1ae817d" alt="" width="2160" height="1196" data-path="assets/file-upload-example.png" />
</Frame>

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:

<Frame>
  <img src="https://mintcdn.com/paragon/p_CuCy_equ6Xxvlm/assets/file-upload-example3.png?fit=max&auto=format&n=p_CuCy_equ6Xxvlm&q=85&s=9d0431d1367998697cee4fcfd18a19e9" alt="" width="2084" height="612" data-path="assets/file-upload-example3.png" />
</Frame>

Or use our [Dynamic Variables](/workflows/using-dynamic-variables) to reference the file to POST to an upload endpoint of your choosing!

<Frame>
  <img src="https://mintcdn.com/paragon/p_CuCy_equ6Xxvlm/assets/file-upload-example4.png?fit=max&auto=format&n=p_CuCy_equ6Xxvlm&q=85&s=1ae280b3183f4c940d0df2c79c79c302" alt="" width="2230" height="1236" data-path="assets/file-upload-example4.png" />
</Frame>
