Uploading multiple files to Dropbox gives 409 error

Describe the problem/error/question

I have some nodes that downloads invoices from my CRM everyday and uploads them to my Dropbox so my accountant can access them but for some reason I get a 409 error when I try to upload more than one file.

Similar issue:

What is the error message (if any)?

Request failed with status code 409

NodeApiError: Your request is invalid or could not be processed by the service
    at Object.dropboxApiRequest (/home/n8n/.nvm/versions/node/v16.18.0/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Dropbox/GenericFunctions.ts:43:9)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Object.execute (/home/n8n/.nvm/versions/node/v16.18.0/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Dropbox/Dropbox.node.ts:905:21)
    at Workflow.runNode (/home/n8n/.nvm/versions/node/v16.18.0/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1261:19)
    at /home/n8n/.nvm/versions/node/v16.18.0/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:949:29

Information on your n8n setup

  • n8n version: 0.222.1
  • Database (default: SQLite): mysql
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: Ubuntu Server 22.04.1 LTS

Hi @Novastream, welcome to the community :tada:

I am sorry to hear you are having trouble. Unfortunately, you didn’t share an example workflow using which the problem can be reproduced. I therefore tried to reproduce the problem using the below approach:

This workflow is however working fine for me, n8n indicates a success:

The three files are available in the Dropbox UI as well:

So perhaps you can share detailed steps on how to reproduce the exact problem you are seeing?

Hi MutedJam, please see below for complete workflow.

I get 21 files and the upload fails but if I limit the workflow to 1 file it does work.

Thanks @Novastream! It seems your Dropbox nodes uses an expression of {{ $node["Get dates"].json["year"] }}/{{ $node["Get dates"].json["month"] }}/{{ $json["invoicename"] }} to set the file path.

Now when your Dropbox node receives multiple items, it’d try to match the first item it receives with the first item from the “Get dates” node which presumably works fine. However, for the second item it’d try to look up the second item from the “Get dates” node which fails from the sounds of it.

So you want to make sure to always use the first item from your “Get dates” node. Built in methods and variables reference - n8n Documentation will have a list of available expressions, in this case $("<node-name>").first()... should do the job. So perhaps try the following expression in your Dropbox node:

{{ $("Get dates").first().json["year"] }}/{{ $("Get dates").first().json["month"] }}//{{ $json["invoicename"] }}

Hope this helps!


Thanks MutedJam, both for the example and the explanation. It’s working as expected now :slight_smile:

1 Like

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