I just encountered something in the n8n Http Request
node where there was an error in the form fields values, but there also happened to be an n8n Binary File
form field. The error message seemed to be related to the binary field so I was troubleshooting the wrong thing.
The real problem was that I had another field value, set by an expression that resulted in a non-“form data compatible” type (e.g. boolean). That caused the request to fail with a confusing and misleading message:: data should be a string, Buffer or Uint8Array
.
As far as I know, the message was caused by the other field, not the one with the n8n Binary File
form data parameter type, but there is no context to make that clear.
So, until the error message includes the problematic form field name(s), maybe this post will provide a clue for someone dealing with a similar scenario.
The error message detail is:
NodeApiError: data should be a string, Buffer or Uint8Array at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:525:33) at processTicksAndRejections (node:internal/process/task_queues:95:5) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:634:19) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:874:51 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1305:20
Calling workflow
Receiving Workflow
Activate this one, and put its production URL in the Http Request
nodes in the other workflow.
Information on your n8n setup
- n8n version: 1.73.1
- Database (default: SQLite): postgres
- n8n EXECUTIONS_PROCESS setting (default: own, main): main
- Running n8n via (Docker, npm, n8n cloud, desktop app): docker
- Operating system: raspberry pi os