HTTP Request failing to use binary file

Hi All,
I have an issue with HTTP Request node to consume an API that requires to send a file in the body.
this is the error I get when I test the workflow:
The item has no binary field ‘[object Object]’ [item 0]

I have try some solutions published for issues like, everything looks good at the node setup but still the issue persist

this is the full error message:
{
“errorMessage”: “The item has no binary field ‘[object Object]’ [item 0]”,
“errorDescription”: “Check that the parameter where you specified the input binary field name is correct, and that it matches a field in the binary input”,
“errorDetails”: {},
“n8nDetails”: {
“nodeName”: “HTTP Request”,
“nodeType”: “n8n-nodes-base.httpRequest”,
“nodeVersion”: 4.2,
“itemIndex”: 0,
“time”: “22/4/2025, 6:31:12 p.m.”,
“n8nVersion”: “1.88.0 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeOperationError: The item has no binary field ‘[object Object]’ [item 0]”,
" at assertBinaryData (/usr/lib/node_modules/n8n/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/binary-helper-functions.ts:73:9)“,
" at Object.assertBinaryData (/usr/lib/node_modules/n8n/node_modules/n8n-core/src/execution-engine/node-execution-context/execute-context.ts:98:21)”,
" at parametersToKeyValue (/usr/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts:305:39)“,
" at prepareRequestBody (/usr/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/HttpRequest/GenericFunctions.ts:264:25)”,
" at ExecuteContext.execute (/usr/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts:330:35)“,
" at WorkflowExecute.runNode (/usr/lib/node_modules/n8n/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1156:9)”,
" at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1508:27",
" at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2065:11"
]
}
}

{
“nodes”: [
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 2
},
“conditions”: [
{
“id”: “2ee748f0-9156-417f-8d40-26ffbd91a602”,
“leftValue”: “={{ $(‘If’).item.json.EnvioDTE.SetDTE.Caratula.RutReceptor }}”,
“rightValue”: “76720193-1”,
“operator”: {
“type”: “string”,
“operation”: “equals”,
“name”: “filter.operator.equals”
}
},
{
“id”: “c1b38bad-2364-4c9e-83e3-fb6a0a449765”,
“leftValue”: “={{ $json.Encabezado.Receptor.RUTRecep }}”,
“rightValue”: “76720193-1”,
“operator”: {
“type”: “string”,
“operation”: “equals”,
“name”: “filter.operator.equals”
}
},
{
“id”: “b07aebcd-7982-4778-aaf7-77a491d08f17”,
“leftValue”: “={{ ["33", "56", "61"].includes($json.Encabezado.IdDoc.TipoDTE ?? ‘’) }}”,
“rightValue”: “”,
“operator”: {
“type”: “boolean”,
“operation”: “exists”,
“singleValue”: true
}
}
],
“combinator”: “and”
},
“options”: {}
},
“type”: “n8n-nodes-base.filter”,
“typeVersion”: 2.2,
“position”: [
120,
560
],
“id”: “871f853f-29bc-4696-9db2-0e40b195c5ce”,
“name”: “Filter”
},
{
“parameters”: {
“method”: “POST”,
“url”: “https://ws-fe.zcloud.cl/src/api/cargar_xml.php”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpHeaderAuth”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “Content-Type”,
“value”: “multipart/form-data”
}
]
},
“sendBody”: true,
“contentType”: “multipart-form-data”,
“bodyParameters”: {
“parameters”: [
{
“name”: “rut_receptor”,
“value”: “76720193-1”
},
{
“name”: “rut_usuario”,
“value”: “10552663-6”
},
{
“parameterType”: “formBinaryData”,
“name”: “document”,
“inputDataFieldName”: “={{ $binary.data }}”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
560,
500
],
“id”: “7e2c8153-473f-4f96-8b41-1f04aae278e3”,
“name”: “HTTP Request”,
“retryOnFail”: true,
“maxTries”: 2,
“credentials”: {
“httpHeaderAuth”: {
“id”: “PitytfZBen0GlgUI”,
“name”: “Header Auth ZionIT”
}
}
},
{
“parameters”: {},
“type”: “n8n-nodes-base.merge”,
“typeVersion”: 3.1,
“position”: [
320,
500
],
“id”: “fa1b6bab-d442-4082-b5c6-a6917dc3e1e7”,
“name”: “Merge”
}
],
“connections”: {
“Filter”: {
“main”: [
[
{
“node”: “Merge”,
“type”: “main”,
“index”: 1
}
]
]
},
“HTTP Request”: {
“main”: [

]
},
“Merge”: {
“main”: [
[
{
“node”: “HTTP Request”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“instanceId”: “2d331c636ea1278273e5f740e579d0f0a5a8fd2b2be027eff9a6c66462804b35”
}
}

I’ve add a merge node before the http request to bring the binary file but still doesn’t work

As you can see in the image binary data is available, but still getting the error
hope someone can help, thanks!!

Hi @alexis.morgado

Use the Merge node in Combine mode,

and set the Input Data Field Name in HTTP node to data

it worked!!
thanks mohamed3nan!!

You’re welcome.

Kindly mark the reply as the solution so others with the same issue can find it easily :white_check_mark::pray:t2:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.