Skip to content

Bug: HTTP Request node fails on multipart/form-data file upload in n8n Cloud #18882

Description

@premkumarkamble

I am unable to send a binary file (a PDF downloaded from Telegram) to an external API using the HTTP Request node. The node fails with internal n8n errors, not API errors. Standard workarounds using the Code node are also blocked by the n8n Cloud environment's security restrictions, making this core task impossible to complete.

The goal is to send a file from a previous node to the Cloudmersive "PDF to Text" API endpoint.

We have systematically tried the following methods, all of which failed:

HTTP Request Node (Method 1): Using Body Content Type: Form-Data and Parameter Type: n8n Binary File. This failed with an internal error.

HTTP Request Node (Method 2): Using Body Content Type: Form-Data, Parameter Type: Form Data, and an expression {{ $binary.data }} in the value field. This also failed with a different internal error.

Code Node Workaround: We then tried to bypass the HTTP Request node by building the request manually in a Code node. This also failed because the n8n Cloud environment's sandbox is too restrictive, throwing errors for Blob is not defined and subsequently Module 'node:buffer' is disallowed when attempting to import the necessary module to create a Blob.

Additionally, I've noticed that common community nodes like n8n-nodes-pdf (which would be the ideal solution) are not available for installation from the "Add Node" panel in my instance.

What is the error message (if any)?

We encountered a series of different errors depending on the method used:

When using the HTTP Request node (Method 1): "Cannot read properties of undefined (reading 'Value')"

When using the HTTP Request node (Method 2): "source.on is not a function"

When using the Code node to work around the issue: "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'"

When attempting to fix the Code node by importing the Blob class: "Module 'node:buffer' is disallowed"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions