Append header and footer to text file

Describe the problem/error/question

New with n8n, I am making a flow which manupulate text, at the end I use “Fixed Width File” to write text with fixed columns
Before to write the file on a FTP Server, I need to add text as header and footer. I have no idea how to do that
With code, I don’t know how to manipulate data, and I didn’t find any node for that

Share the output returned by the last node

The “Fixed Width File” node returns data
image

Information on your n8n setup

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

Thanks a lot for your help

Hi @ppcm, welcome to the community!

I haven’t used the n8n-nodes-fixed-width-file community node myself, but from looking at your screenshot it appears you have a simple binary object in n8n. To manipulate the content you’d first need to make it available to n8n using the Move Binary Data node. You can then use a Set node to wrap lines around the existing content.

Here’s how this looks in a workflow:

Input file:

image

Result file:

image

Hope this helps!

1 Like

This is exactly what I needed!
Thanks a lot

1 Like

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