REST-API storing payload

Hi everyone,

We are currently working on creating a backup of data from a SaaS service by retrieving it through the available API. The API call returns a fairly large JSON payload containing various data types (strings, integers, objects, etc.). Getting the data types correctly mapped in a model has turned out to be quite a challenge, even when using the “Import Model from JSON” feature in Studio. We keep running into errors like the one shown in the screenshot.

image

Since we need to set up multiple API calls and the response data is only being stored, not processed, it feels like a lot of effort to spend time building and troubleshooting these models.

We have also tried overriding the response Content-Type header from application/json to text/plain using the custom headers in the output. Unfortunately, the flow still returns a “Failed to parse response” error.

Does anyone know if it’s possible in Flow Classic or Flow Connect to write the incoming JSON payload directly to a file without first creating a model for it?

Thanks in advance!

Yes, this is possible in Flow Connect without creating a model for the JSON payload.

The HTTP request step lets you select Text, Binary, or JSON as the response type. Select Text or Binary to read the response body without deserializing it into a typed JSON model—even when the API returns Content-Type: application/json. There is no need to override that header.

For a backup-only workflow, I would recommend:

  1. Configure the HTTP request step to return Binary and store the response in a binary variable.

  2. Use the File System connector’s Write Binary operation to save that content as a .json file.

This avoids mapping individual fields and avoids decoding and re-encoding the payload as text. The File System connector writes to a local or network file system through an on-premise connector agent, which needs the appropriate write permissions.

Alternatively, you can retrieve the response in a FlowScript step:

return HTTP.request(
    "https://api.example.com/export",
    { headers: { "Accept": "application/json" } }
).asBinary();


The HTTP module also provides .asText(), explicitly documented as suitable for JSON, XML, and CSV. You can use that with Write Text if you prefer a text-based approach.

For large exports, note that Flow Connect has a documented 250 MB upload/download file-size limit.