Error while uploading binary data to google drive: No binary data exists on item!

Describe the problem/error/question

Hello community,
I’m having a problem when I’m uploading a binary data to google drive. I get the binary data from the http node and I can see that I have a binary data there but when I try to upload this to google drive I get the following error ERROR: No binary data exists on item!

I checked couple of posts people mentioned the name of the binary data needs to match in the Binary Property in my case this is matching. Not sure what I’m missing. I would appreciate any idea what might be the problem here.


What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Irem_Odemis - sorry to hear you’re having trouble with this!

On the HTTP request node, are you specifying “file” as a response? That looks like this:

It’s a much simpler workflow, but here’s an example of how it would look:

Let me know if that helps!

1 Like

Hello @EmeraldHerald
thanks for your reply.
Yourexample workflow works without an error but I can’t find the file in google drive afterwards for some reason.

{
“meta”: {
“instanceId”: “bd3424651820da96219b3bf8bf1cdfabcd2b0cc2dbde58159a106ccfa63cca09”
},
“nodes”: [
{
“parameters”: {
“url”: “https://www.nasa.gov/sites/default/files/styles/full_width_feature/public/thumbnails/image/52920038606_816bedf573_k.jpeg”,
“options”: {
“response”: {
“response”: {
“responseFormat”: “file”
}
}
}
},
“id”: “21a8c47d-406a-4f47-a65b-8cf0df30a64d”,
“name”: “HTTP Request1”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.1,
“position”: [
820,
40
]
},
{
“parameters”: {
“authentication”: “serviceAccount”,
“binaryData”: true,
“name”: “QR-influencer”,
“options”: {}
},
“id”: “dc114b65-38be-403c-bc0e-b633404a04b3”,
“name”: “Google Drive1”,
“type”: “n8n-nodes-base.googleDrive”,
“typeVersion”: 2,
“position”: [
1180,
60
],
“credentials”: {
“googleApi”: {
“id”: “1”,
“name”: “Google account”
}
}
}
],
“connections”: {
“HTTP Request1”: {
“main”: [
[
{
“node”: “Google Drive1”,
“type”: “main”,
“index”: 0
}
]
]
}
}
}

In my workflow I fixed the response part and changed the response format to file but stil I get the same error in the google drive.

I also have binary data togle enabled in my google drive. Not sure why I get this error

Hi @Irem_Odemis ah, I see the issue after playing around with it myself. You’ll need to move the order of operations, like this:

Create the folder, and then make your request for the binary file so it can be carried through to drive node where you’re uploading.

That worked just fine for me, making a folder with the image I requested:

Hope that helps!

2 Likes

@EmeraldHerald
thank you! It worked when I changed the order. :slight_smile:

2 Likes

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