Combine replace text in 1 file with text from another file?

Hello -

I am trying to create an N8N flow which will take the input file template.html from an FTP and replace the text “thisisplaceholdertext” inside that file with the text from a different file called negative.html also from ftp. I wrote JS which I thought would do the trick but it isn’t returning the combined output? I think I am close on this one… any input is appreciated :slight_smile:

I am running N8N 1.9.3 on a docker container

Thank you

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:

Hello @n8n_rookie

Before using code node, you will need the extract from file node to receive the actual text you can work with. Then you will be able to repkace what you need with edit fields/code node

Hello @barn4k - I don’t see a node called “Extract from File”. I noticed the FTP node does set the value of the file to binary.

That one. If you don’t see it, then update the n8n version. It’s pretty old

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