FTP Path taking expression as literal

Problem: Filenames are not being set correctly when sending files via FTP.
I have a json object being set earlier in the workflow to by a code block and then use an epxression to set the path.
\HaloOutput{{ $(‘Format Date’).item.json.Name }}.mkv
When setting the expression, the result shows the correct path but when running the workflow the file gets named as “\HaloOutput{{ $(‘Format Date’).item.json.Name }}.mkv”.
It seems as though the path epression is being taken literally.

Full workflow.

This is the node in question showing the expression result.

The name field is set by this code block that formats the date and time for the block that downloads the file as well as removes the illegal characters for the FTP upload

This is how the file appears in the FTP Server.

This is the output of the last node

Information on your n8n setup

-n8n version: 1.66.0
-Database: sqlite
-n8n EXECUTIONS_PROCESS setting: regular
-Running n8n via Docker
-Operating system: Linux Ubuntu 24.04.1 LTS (installed yesterday)

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:

n8n version: 1.66.0
Database: sqlite
n8n EXECUTIONS_PROCESS setting: regular
Running n8n via Docker
Operating system: Linux Ubuntu 24.04.1 LTS (installed yesterday)

Hey @jordessey

Welcome to the community :birthday:

Can you share the workflow json with us so we can take a proper look?

Ok the small fact that i pasted the JSON and it inputs as that^ is awesome

Just updated n8n to 1.67.1
~did not fix the issue

Hey @jordessey,

It sounds odd but can you change all of the \ in your path to / which is normally preferred by FTP servers?

I think what is happening is the \ before the { is escaping it preventing the expression from running.

Hi There.

Yes the opposite slashes has done the trick.
I tried this initially in version 1.66.0 and got an invalid path error. I attributed it to Linux pathing vs windows pathing but they may have been due to something else that I inadvertently fixed and didn’t realize.

Cheers
Jordan

1 Like