Bad Request - Incorrect Filename?

Describe the problem/error/question

Trying to download a file and then upload a file via HTTP Request Node(s).

What is the error message (if any)?

" Bad request - please check your parameters

Incorrect filename!"

Please share your workflow



Share the output returned by the last node

Error code

400

Full message

400 - "{\"err\":\"Incorrect filename!\",\"ECODE\":\"UPLOAD_002\"}"

Request

{ "headers": { "accept": "application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, image/*;q=0.8, */*;q=0.7", "Authorization": "**hidden**", "content-type": "multipart/form-data; boundary=--------------------------102800132227740260862873" }, "method": "POST", "uri": "https://api.clickup.com/api/v2/task/86b1pxkj1/attachment", "gzip": true, "rejectUnauthorized": true, "followRedirect": true, "resolveWithFullResponse": true, "followAllRedirects": true, "timeout": 300000, "formData": { "_overheadLength": 158, "_valueLength": 0, "_valuesToMeasure": [ { "fd": null, "path": "/home/node/.n8n/binaryData/workflows/uAkLjeZTEckKEcdB/executions/592/binary_data/e4e8d326-6cc0-40a5-81a0-5a48c224d853", "flags": "r", "mode": 438, "end": null, "bytesRead": 1678263, "_events": {}, "_readableState": { "highWaterMark": 65536, "buffer": [], "bufferIndex": 0, "length": 0, "pipes": [], "awaitDrainWriters": null }, "_eventsCount": 2 } ], "writable": false, "readable": true, "dataSize": 0, "maxDataSize": 2097152, "pauseStreams": true, "_released": true, "_streams": [], "_currentStream": null, "_insideLoop": false, "_pendingNext": false, "_boundary": "--------------------------102800132227740260862873", "_events": {}, "_eventsCount": 3 }, "encoding": null, "json": false, "useStream": true }

Information on your n8n setup

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

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Hey @Luke_Sellers,

Looking at the API docs for the call you are making you are sending a file key but the api expects it to be called attachments and to be an array. Can you try changing this to match what the API expects to see if it helps.

1 Like

Hey Jon, thanks for the response. This may be a dumb question but I am new to this, how would I convert the “item” or data/file I suppose in this case to an array?

Hey @Luke_Sellers,

Good question, I would try just naming the json field attachments[0] and see if that works if it doesn’t it will be more complicated

Still gave me the bad filename error - I also tried using an aggregate node to create an array, but the http request node then throws an error because it expects a binary file and not an array. Seems like maybe n8n and ClickUp don’t play well together in this instance.

I put quotes around attachments[0] and it gave me a new error
Bad request - please check your parameters

{“err”:“No attachment supplied”,“ECODE”:“ATTCH_039”}

its not taking the binary field

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