Nextcloud Upload using base64 encoded string

Describe the issue/error/question


I am trying to upload a txt file to Nextcloud using a base64 encoded string as source, and decoding it before the save. But it ends being an blank line in the file.

My expression looks like:

{{ atob("SGVsbG8gV29ybGQh") }}


The function finishes successfully but the txt file only contains the Test line:


The interesting thing is that I can see the output correctly decoded in the expression preview window.
So the issue is only when running the workflow.

What is the error message (if any)?


Node config

Information on your n8n setup

  • n8n version: 0.159.0
  • Database you’re using (default: SQLite): SQLite
  • Running n8n with the execution process [own(default), main]: main
  • Running n8n via [Docker, npm,, desktop app]: Docker

Try with {{Buffer.from("SGVsbG8gV29ybGQh", 'base64').toString()}} instead.

Thanks @RicardoE105 that worked perfectly!

1 Like