Help Needed: Base64 Decoding in Make Fails with toBinary() ({empty} Error)

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.

Hello @Marc64,
This example is based on the Hello world you mentioned on the original topic.

Based on the attached image, 1 and 2 also work well as expected without error. But 3 gave me an error.

These are copied syntax from the example I used. Keep in mind that 3rd one also gives me errors as well.

  1. {{toBinary("SGVsbG8gV29ybGQ="; "base64")}}
  2. {{toString(toBinary("SGVsbG8gV29ybGQ="; "base64"))}}
  3. {{toBinary("""SGVsbG8gV29ybGQ="""; base64)}}

Cover your syntax with backtick ( ` ). It’s more readable.

I hope this helps you.


:bulb:P.S.: Always search first, Check Make Academy. If this is helpful, mark it as a solution :white_check_mark: and :+1:
Need expert help or have questions? Contact or comment below! :point_down: