Unable to download file via Google drive node

Describe the issue/error/question

I can’t download a file (by ID) with the Google drive node

What is the error message (if any)?

ERROR: The resource you are requesting could not be found

Please share the workflow

Share the output returned by the last node

{"message":"404 - {\"error\":{\"errors\":[{\"domain\":\"global\",\"reason\":\"notFound\",\"message\":\"File not found: 17ZSfK3-c73rhwPzmRlA2EnBVcOdkDkr9.\",\"locationType\":\"parameter\",\"location\":\"fileId\"}],\"code\":404,\"message\":\"File not found: 17ZSfK3-c73rhwPzmRlA2EnBVcOdkDkr9.\"}}","name":"Error","stack":"Error: Request failed with status code 404\n    at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n    at IncomingMessage.emit (node:events:539:35)\n    at endReadableNT (node:internal/streams/readable:1345:12)\n    at processTicksAndRejections (node:internal/process/task_queues:83:21)"}

Information on your n8n setup

  • n8n version: 0.176.0
  • Database you’re using (default: SQLite):
  • **Running n8n via [Docker, npm, n8n.cloud, desktop app]:**docker-compose

Welcome to the community @luca_zenkai !

Looks like you are using two different credentials. One to list the files and a second different one (which does not have access to the files) to download them. If you use the same credentials it will work fine.

Additionally can you simplify it a little bit. You can change the expression on the node “Download each of the queried files” from {{encodeURI($node["Search for files in specific parent folder"].json["id"]).toString()}} to {{$json["id"]}}.

Hey @jan,

thanks for your quick response!

My credentials are now the same for both nodes, but same output - even after changing the expression as you mentioned. I’ve readded and reauthorized the OAuth2 in the cloud console to check if everything works fine again. (no change)
It’s also odd because the same credentials where used in other workflows without any problems, but after checking this I noticed that those workflows are also faulty since a few days. (not sure if my last update is causing this)

Hi @luca_zenkai,

I’m not sure about your case but if you are trying to download a file that in a shared drive, you can’t download with the Google Drive node because Google Drive needs a parameter in request that indicates the file is in a shared drive and the node doesn’t have this option.

You can try to use my workaround for that.

Hope it helps

2 Likes

Hey @samaritan ,

I’m exactly trying to do this - downloading from a shared drive.
I will try your workaroud or use a folder of mine instead. Thank you @samaritan & @jan

Support got added (feat(Google Drive Node): Add Shared Drive support for operations download, delete and share by janober · Pull Request #3294 · n8n-io/n8n · GitHub) and will be released with the next version.

1 Like

Very cool! :rocket:
Thanks @jan :slight_smile:

Thank you @jan

Getting solutions in a very short time provides a great motivation to support this community.

1 Like

Thanks, that is great to hear! We do always try our best.

1 Like

Got released with [email protected]

1 Like