> For the complete documentation index, see [llms.txt](https://docs.digibee.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digibee.com/documentation/troubleshooting/integration-guides/payloads-larger-than-5mb.md).

# How to handle request payloads larger than 5MB

Learn how to use the HTTP File Trigger to process payloads exceeding 5MB in your pipeline.

Both [**REST**](/documentation/connectors-and-triggers/triggers/web-protocols/rest.md) and [**HTTP**](/documentation/connectors-and-triggers/triggers/web-protocols/http.md) triggers have a payload limit of 5MB. If this limit is reached, the Platform returns the HTTP status "413" with the following message:

```json
{
    "message": "Request size limit exceeded"
}
```

Below you can find out more about an alternative method for handling requests that exceed the payload limit.

## **Step-by-step guide for handling requests larger than 5MB**

{% stepper %}
{% step %}

### **Use the HTTP File Trigger**

You can use the [**HTTP File Trigger**](/documentation/connectors-and-triggers/triggers/web-protocols/http-file.md) to process payloads larger than 5MB by sending the data as a file.

Specify the appropriate content type for your file under **Body Upload** and **Response Content-Types**. In this example, the value is `application/json`, but it can also be other formats, such as `application/pdf` or `application/jpeg`.

<figure><img src="https://content.gitbook.com/content/boT4qPJIk6PZotrxlJWL/blobs/dp7YurjVgJvGG5pVUOF2/HTTP%20File%20Trigger.png" alt=""><figcaption></figcaption></figure>

After receiving the payload with the [**HTTP File Trigger**](/documentation/connectors-and-triggers/triggers/web-protocols/http-file.md), you can access the **Monitor** page to see the [**Execution Details**](/documentation/development-cycle/dashboards/completed-executions.md). Note that the payload is received as a file and not in the body key. In this context, the body key is empty.

<figure><img src="https://content.gitbook.com/content/boT4qPJIk6PZotrxlJWL/blobs/EbfZQGC2RmJjQvQT7Bc2/image1.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/boT4qPJIk6PZotrxlJWL/blobs/q03gAcN2vq4KraYn754o/image3.png" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### **Save the input data in the Session Management connector**

Special handling is required to access the uploaded file. A common approach is to store the request’s input data in a [**Session Management**](/documentation/connectors-and-triggers/connectors/structured-data/session-management.md) connector, preserving details such as `Headers` and `QueryAndPath`.

<figure><img src="https://content.gitbook.com/content/boT4qPJIk6PZotrxlJWL/blobs/06PIPCKTDlnjUJAQJaIl/Session%20Management%20connector.png" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### **Convert the string into JSON**

Use the [**File Reader**](/documentation/connectors-and-triggers/pt-br/connectors/files/file-reader.md) connector to read the file and convert it into a JSON string. Then, apply the Double Braces [`TOJSON` function](/documentation/connectors-and-triggers/double-braces/double-braces-functions/json-functions.md) to transform it into a JSON object.

In this example, the conversion takes place in the [**JSON Generator**](/documentation/connectors-and-triggers/connectors/tools/json-generator.md) connector, named "TOJSON data", as illustrated in the image below.

<figure><img src="https://content.gitbook.com/content/boT4qPJIk6PZotrxlJWL/blobs/7jBJtegYb3iHhXx1Pr9R/JSON%20Generator%20(Mock).png" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### **Configure the response of the pipeline**

Once you have obtained the desired payload, you need to prepare the pipeline's response. You can return either a `.json` file or a JSON object.

To generate a file, use the [**File Writer**](/documentation/connectors-and-triggers/connectors/files/file-writer.md) connector:

<figure><img src="https://content.gitbook.com/content/boT4qPJIk6PZotrxlJWL/blobs/FWRj03iOpw2pCZKbjGuS/File%20Writer.png" alt=""><figcaption></figcaption></figure>

Alternatively, you can use a [**JSON Generator**](/documentation/connectors-and-triggers/connectors/tools/json-generator.md) connector to structure and provide the final response, as shown in the following example:

<figure><img src="https://content.gitbook.com/content/boT4qPJIk6PZotrxlJWL/blobs/RDC4MzXh6e1T3zkQLVii/JSON%20Generator%20(Mock)%20-%20Response.png" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.digibee.com/documentation/troubleshooting/integration-guides/payloads-larger-than-5mb.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
