What are you trying to achieve?
I’m trying to decode a simple Base64 string like SGVsbG8gV29ybGQ=, which represents Hello World (just to keep it simple). However, I keep running into the following error when using toBinary():
Failed to map ‘0.value’: Function ‘toBinary’ finished with error! ‘{empty}’ is not a valid encoding.
Thanks for any support Marc
Background of the Project:
Google Drive Watch All Files (ok)
Google Drive Download File (ok)
Tools {{toString(toBinary(data; base64))}} (OK)
Text parser “_data”\s*:\s*“(.*?)” (OK)
Steps taken so far
Using toBinary() Directly:
I’ve hardcoded the Base64 string directly in the formula like this: {{toBinary(“SGVsbG8gV29ybGQ=”; base64)}}
Still getting the {empty} error.
Using toString() with toBinary():
Attempted to chain toString() after toBinary() to convert the binary output to text:
{{toString(toBinary(“SGVsbG8gV29ybGQ=”; base64))}}
Adding a Header:
I tried prepending a Base64 header to the string, like this: {{toBinary(“data:text/plain;base64,SGVsbG8gV29ybGQ=”; base64)}}
No change. Still the same error.
Replacing Spaces:
{{replace(31.value; space; emptystring)}}
Using the “Convert the encoding of a text” Module:
I set the input as SGVsbG8gV29ybGQ= and used ASCII as the input codepage and UTF-8 as the output codepage.
However, the module just passes through the Base64 string unchanged and doesn’t decode it.
And also with {{toBinary(“SGVsbG8gV29ybGQ=”; base64)}}
I tested the string in external tools (like online Base64 decoders), and it decodes correctly to Hello World.