Gemini Node Analyze Upload File Error

When uploading a file to gemini to analyze using the google gemini node, the output returns: The file failed to be processed. Error uploading file

Error detail is: {
“errorMessage”: “The file failed to be processed.”,
“errorDescription”: “Error uploading file”,
“errorDetails”: {},
“n8nDetails”: {
“nodeName”: “Analyze video”,
“nodeType”: “@n8n/n8n-nodes-langchain.googleGemini”,
“nodeVersion”: 1.2,
“resource”: “video”,
“operation”: “analyze”,
“time”: “5/22/2026, 10:45:15 PM”,
“n8nVersion”: “2.21.5 (Cloud)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeOperationError: The file failed to be processed.”,
" at ExecuteContext.uploadFile (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_d8896bbac334dcd7b1d92e42db4167d9/node_modules/@n8n/n8n-nodes-langchain/nodes/vendors/GoogleGemini/helpers/utils.ts:111:9)“,
" at processTicksAndRejections (node:internal/process/task_queues:104:5)”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_d8896bbac334dcd7b1d92e42db4167d9/node_modules/@n8n/n8n-nodes-langchain/nodes/vendors/GoogleGemini/helpers/baseAnalyze.ts:68:12",
" at async Promise.all (index 0)“,
" at ExecuteContext.baseAnalyze (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_d8896bbac334dcd7b1d92e42db4167d9/node_modules/@n8n/n8n-nodes-langchain/nodes/vendors/GoogleGemini/helpers/baseAnalyze.ts:71:21)”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_d8896bbac334dcd7b1d92e42db4167d9/node_modules/@n8n/n8n-nodes-langchain/nodes/vendors/GoogleGemini/actions/video/analyze.operation.ts:101:9)“,
" at ExecuteContext.router (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_d8896bbac334dcd7b1d92e42db4167d9/node_modules/@n8n/n8n-nodes-langchain/nodes/vendors/GoogleGemini/actions/router.ts:56:25)”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_d8896bbac334dcd7b1d92e42db4167d9/node_modules/@n8n/n8n-nodes-langchain/nodes/vendors/GoogleGemini/GoogleGemini.node.ts:15:10)“,
" at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+exporter-trace-otlp_2c2e1f47b69b34bef6f634a13cbf61d9/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1048:9)”,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+exporter-trace-otlp_2c2e1f47b69b34bef6f634a13cbf61d9/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1239:11)“,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+exporter-trace-otlp_2c2e1f47b69b34bef6f634a13cbf61d9/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1687:27”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+exporter-trace-otlp_2c2e1f47b69b34bef6f634a13cbf61d9/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2339:11"
]
}
}

Adding a code node to check if the file is clean with hasFtyp, which came showing as true so the file is valid.

This problem did not exist today when testing at the start of the day, it only came up a few hours ago, there were no changes to the workflow and the nodes during this time.

Google Gemini node version: 1.2 (Latest)

Running n8n via: n8n cloud

n8n version: 2.21.5

@RaivoVValainis the “file failed to be processed” error fires after the upload to Google’s File API succeeds — Gemini’s async processing step is what’s failing, n8n is just relaying their response. since you confirmed the MP4 is valid (hasFtyp ok, 2.6MB, H.264) and the workflow worked earlier today with no config changes, the failure is server-side at Gemini, not your setup.

most common cause for the on/off pattern is Gemini File API quota throttling — there’s a daily file-upload quota per project that’s separate from the inference token quota. check at console.cloud.google.com → APIs & Services → Quotas → search “generative language API” and look at file storage/upload limits.

worth noting too that uploaded files auto-expire after 48 hours on Gemini’s side, so if anything in the flow holds onto a previous file URI it’ll throw this same generic error. for fresh uploads though, the daily quota is the more likely culprit when it flips like this.

Hi @RaivoVValainis Welcome!
Try it with this workflow:

hello @RaivoVValainis
welcome to the n8n community.
did you try normalizing before Gemini? even with a valid mp4 it could be a supported codec error.

The binaryDataMode: filesystem in your error log is worth checking - on n8n Cloud this should typically be memory, and filesystem mode means the binary file is being written to local disk before upload. If the temp file path is inaccessible or the file gets partially written, the Gemini upload will fail with exactly this error. Check in your Cloud instance settings whether binary data mode has been changed, and try switching it back to memory if so. Also worth testing: retry the exact same file in a fresh execution to rule out a transient Gemini File API issue, since those do happen occasionally.

Thanks for the reply, I knew that it probably is on google end as the workflow worked before so probably got rate limited by their set quota, I however was not able to find your specific service that you mentioned, I did see other services though, I ran it next day and it worked like it did before