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
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"]}}.
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)
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.
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