Binary Data Not Passing to HTTP Request Node

Description

I am currently working on a workflow in n8n where I download a DOCX/PDF file from Google Drive and then pass it to CloudConvert via an HTTP request for conversion to text. However, when attempting to send the binary file, I receive the following error:

NodeOperationError: This operation expects the node’s input data to contain a binary file ‘[object Object]’, but none was found [item 0]


**What I Have Tried**

1. **Verified Binary Data Exists:**
  * The node **"Descarga archivo original" (Download File)** correctly downloads the file.
  * The binary **view in n8n** shows the file with a **"Download" button**, and clicking it successfully downloads the file.
  * The downloaded file comes from an **n8n URL**, meaning n8n does have the binary stored.
2. **Expression Used to Reference Binary Data:**
  * I used the following expression to reference the binary data in my HTTP Request node:


{{ $("Descarga archivo original").item.binary.resume }}


  * According to the **n8n documentation**, this should return the binary object to be passed in the HTTP request.
  * However, the request fails with the error mentioned above.
3. **Checked Binary Data Output:**
  * In the **schema and JSON views**, no **"binary"** field is visible, only metadata like `mimeType`, `id`, and `fileName`.
  * However, in the **binary view**, the file is clearly present and downloadable.

**Expected Behavior**

* The **expression should correctly reference the binary file**, allowing it to be passed as a **binary payload** to CloudConvert via an HTTP Request.

#### **Actual Behavior**

* The HTTP request fails because it doesn’t detect the binary file in the expected reference.

**Questions for the Community**

1. **Is there a bug preventing binary data from being referenced properly via expressions?**
2. **Does n8n require an explicit method (e.g., Set node or Merge node) to make binary data available?**
3. **Is there a better way to pass the downloaded binary file to an HTTP request node?**
4. **Does the "Put Output File in Field" option in the Google Drive node affect how binary data is stored and referenced?**

**Environment**

* **n8n Version:** 1.80.5 (Cloud)
* **Node Type in Question:** HTTP Request
* **Google Drive Node Configuration:**
  * **Operation:** Download
  * **Put Output File in Field:** `"resume"`
  * **Google File Conversion:** Enabled (Text format)

**Attachments**

* Screenshot of **binary data output** (word docx document)
* Screenshot of **error message**
* Workflow JSON (if required)

![workflow|690x456](upload://8BHvx7n5s2xGCmufmuCVUSVLzuC.jpeg)

![error msg|690x278](upload://gQs6W1bC2ZZEqJwQ0MO49ufoBdc.jpeg)


![word document|578x500](upload://wH2NCuOHJW5cIkZ6vHToog58gIm.jpeg)

{
“name”: “OFai - Initial indexing”,
“nodes”: [
{
“parameters”: {},
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
-540,
-640
],
“id”: “2e0991ab-5e1d-4c09-bc70-723713c38217”,
“name”: “When clicking ‘Test workflow’”
},
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 2
},
“conditions”: [
{
“id”: “d8af2a5e-3c9d-4a7b-adec-1befca000298”,
“leftValue”: “={{ $json.mimeType }}”,
“rightValue”: “application/vnd.google-apps.folder”,
“operator”: {
“type”: “string”,
“operation”: “equals”
}
}
],
“combinator”: “and”
},
“options”: {}
},
“type”: “n8n-nodes-base.filter”,
“typeVersion”: 2.2,
“position”: [
60,
-640
],
“id”: “a124679f-363a-40b3-9b75-75fc0c42d366”,
“name”: “Seleccionar solo carpetas”
},
{
“parameters”: {
“resource”: “fileFolder”,
“searchMethod”: “query”,
“queryString”: “"1qDhPKWEu-WWo3_mfq36WHg9yVko2c6He" in parents”,
“returnAll”: true,
“filter”: {},
“options”: {
“fields”: [
“id”,
“name”,
“mimeType”
]
}
},
“type”: “n8n-nodes-base.googleDrive”,
“typeVersion”: 3,
“position”: [
-220,
-640
],
“id”: “2ea93edb-4e8c-4a03-90f0-2424f176d08d”,
“name”: “Buscar todos los elementos en la carpeta raiz”,
“credentials”: {
“googleDriveOAuth2Api”: {
“id”: “QsGc1jipcCRllLVQ”,
“name”: “Google Drive account”
}
}
},
{
“parameters”: {
“options”: {}
},
“type”: “n8n-nodes-base.splitInBatches”,
“typeVersion”: 3,
“position”: [
340,
-640
],
“id”: “f9485f0b-61e9-41ee-aa12-67b7e686ea54”,
“name”: “Para cada carpeta”
},
{
“parameters”: {
“resource”: “fileFolder”,
“searchMethod”: “query”,
“queryString”: “=‘{{ $json["id"] }}’ in parents”,
“returnAll”: true,
“filter”: {},
“options”: {
“fields”: [
“id”,
“name”,
“mimeType”
]
}
},
“type”: “n8n-nodes-base.googleDrive”,
“typeVersion”: 3,
“position”: [
-540,
-380
],
“id”: “ec79b534-a118-4d26-b113-eebb5294d0bf”,
“name”: “Extraer archivos”,
“alwaysOutputData”: false,
“credentials”: {
“googleDriveOAuth2Api”: {
“id”: “QsGc1jipcCRllLVQ”,
“name”: “Google Drive account”
}
}
},
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 2
},
“conditions”: [
{
“id”: “3dc04ed0-959f-4ace-b6e2-68b09c32a41c”,
“leftValue”: “={{ $json.mimeType }}”,
“rightValue”: “pdf”,
“operator”: {
“type”: “string”,
“operation”: “contains”
}
},
{
“id”: “20f79f69-e0f2-4459-a954-25e9bfadd394”,
“leftValue”: “={{ $json.mimeType }}”,
“rightValue”: “application/vnd.openxmlformats-officedocument.wordprocessingml.document”,
“operator”: {
“type”: “string”,
“operation”: “equals”,
“name”: “filter.operator.equals”
}
}
],
“combinator”: “or”
},
“options”: {}
},
“type”: “n8n-nodes-base.filter”,
“typeVersion”: 2.2,
“position”: [
-220,
-380
],
“id”: “5189a068-36ed-40bd-ba18-e13a86e4b16f”,
“name”: “Solo PDF y DOCX”
},
{
“parameters”: {
“operation”: “download”,
“fileId”: {
“__rl”: true,
“value”: “={{ $json["id"] }}”,
“mode”: “id”
},
“options”: {
“binaryPropertyName”: “resume”
}
},
“type”: “n8n-nodes-base.googleDrive”,
“typeVersion”: 3,
“position”: [
60,
-380
],
“id”: “7e5b27db-296c-478a-83be-463226bb2a4c”,
“name”: “Descarga archivo original”,
“credentials”: {
“googleDriveOAuth2Api”: {
“id”: “QsGc1jipcCRllLVQ”,
“name”: “Google Drive account”
}
}
},
{
“parameters”: {
“method”: “POST”,
“url”: “https://api.cloudconvert.com/v2/jobs”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “Authorization”,
“value”: “Bearer eyJ0eXAiOiJKV1QiLC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sBS1x_TvBuCytiA_gx2B8M3PHyJ27-MffBg”
},
{
“name”: “Content-Type”,
“value”: “application/json”
}
]
},
“sendBody”: true,
“specifyBody”: “json”,
“jsonBody”: “{\n "tasks": {\n "import-1": {\n "operation": "import/upload"\n },\n "convert-1": {\n "operation": "convert",\n "input": "import-1",\n "output_format": "txt"\n },\n "export-1": {\n "operation": "export/url",\n "input": "convert-1"\n }\n }\n}”,
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
360,
-380
],
“id”: “accf86ae-3ac8-488f-ba07-2395c33e8269”,
“name”: “HTTP Request - Obtener url para depositar archivo”,
“alwaysOutputData”: false
},
{
“parameters”: {
“method”: “PUT”,
“url”: “={{ $(‘HTTP Request - Obtener url para depositar archivo’).item.json.data.tasks[0].result.form.url }}\n”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “Content-Type”,
“value”: “={{ $(‘Descarga archivo original’).item.json.mimeType }}”
}
]
},
“sendBody”: true,
“contentType”: “multipart-form-data”,
“bodyParameters”: {
“parameters”: [
{
“name”: “acl”,
“value”: “private”
},
{
“name”: “key”,
“value”: “={{ $(‘HTTP Request - Obtener url para depositar archivo’).item.json.data.tasks[0][‘result’][‘form’][‘parameters’][‘key’] }}”
},
{
“name”: “success_action_status\t”,
“value”: “=201”
},
{
“name”: “X-Amz-Credential”,
“value”: “={{ $(‘HTTP Request - Obtener url para depositar archivo’).item.json.data.tasks[0][‘result’][‘form’][‘parameters’][‘X-Amz-Credential’] }}”
},
{
“name”: “X-Amz-Algorithm”,
“value”: “AWS4-HMAC-SHA256”
},
{
“name”: “X-Amz-Date”,
“value”: “={{ $(‘HTTP Request - Obtener url para depositar archivo’).item.json.data.tasks[0][‘result’][‘form’][‘parameters’][‘X-Amz-Date’] }}”
},
{
“name”: “Policy”,
“value”: “={{ $(‘HTTP Request - Obtener url para depositar archivo’).item.json.data.tasks[0][‘result’][‘form’][‘parameters’][‘Policy’] }}”
},
{
“name”: “X-Amz-Signature”,
“value”: “={{ $(‘HTTP Request - Obtener url para depositar archivo’).item.json.data.tasks[0][‘result’][‘form’][‘parameters’][‘X-Amz-Signature’] }}”
},
{
“parameterType”: “formBinaryData”,
“name”: “resume”,
“inputDataFieldName”: “={{ $("Descarga archivo original").item.binary.resume }}”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
-540,
-140
],
“id”: “ad68ac1a-45ed-4218-bdf1-61b1c2138cd1”,
“name”: “HTTP Request - depositar archivo”
}
],
“pinData”: {
“When clicking ‘Test workflow’”: [
{
“json”: {}
}
]
},
“connections”: {
“When clicking ‘Test workflow’”: {
“main”: [
[
{
“node”: “Buscar todos los elementos en la carpeta raiz”,
“type”: “main”,
“index”: 0
}
]
]
},
“Seleccionar solo carpetas”: {
“main”: [
[
{
“node”: “Para cada carpeta”,
“type”: “main”,
“index”: 0
}
]
]
},
“Buscar todos los elementos en la carpeta raiz”: {
“main”: [
[
{
“node”: “Seleccionar solo carpetas”,
“type”: “main”,
“index”: 0
}
]
]
},
“Para cada carpeta”: {
“main”: [
,
[
{
“node”: “Extraer archivos”,
“type”: “main”,
“index”: 0
}
]
]
},
“Extraer archivos”: {
“main”: [
[
{
“node”: “Solo PDF y DOCX”,
“type”: “main”,
“index”: 0
}
]
]
},
“Solo PDF y DOCX”: {
“main”: [
[
{
“node”: “Descarga archivo original”,
“type”: “main”,
“index”: 0
}
]
]
},
“Descarga archivo original”: {
“main”: [
[
{
“node”: “HTTP Request - Obtener url para depositar archivo”,
“type”: “main”,
“index”: 0
}
]
]
},
“HTTP Request - Obtener url para depositar archivo”: {
“main”: [
[
{
“node”: “HTTP Request - depositar archivo”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“active”: false,
“settings”: {
“executionOrder”: “v1”
},
“versionId”: “9ec44be0-1329-4510-a72e-0f6a9308e785”,
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “0d023227f1831603dab1bc4dbe4703bfa03efc0217b8b3a8bc0464b0ab7c8548”
},
“id”: “2i0IPbGXZe97OlUs”,
“tags”:
}

  1. Could you ctl a, ctl c to copy the entire workflow and paste into the field that appears when you click the ‘</>’ on the forums here?
  2. It is recommended via the docs to never use direct .binary access, and instead to try access via this helper:

Should I use a code node? Im trying to do it without coding.

Just found a way with a node code as advised.

Put this:

let binaryDataBufferItem = await this.helpers.getBinaryDataBuffer(0, ‘resume’);

return [
{
json: {}, // Keep empty JSON
binary: {
file: {
data: binaryDataBufferItem, // Correct way to reference binary data
fileName: items[0].binary.resume.fileName,
mimeType: items[0].binary.resume.mimeType
}
}
}
];

2 Likes

Yes to use the file helper it is intended to be used with a code node. Would appreciate if you could mark my recommendation as the solution :slight_smile:

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