Correct Syntax to Base64 Encode a String Constant in Server Action Step

I need to base64 encode my username/password for authorisation to an api, and I want to be sure I have the syntax right.

Would it be this?

{{'myusername:mypassword'.encodeBase64()}}

With the single quotes around the string myusername:mypassword?

Yes, I think this is correct. You could check it by decoding it in Server Connect or you could paste the encoded result into an online decoder.

As far as I can see, it’s no longer possible to apply the formatter to a string like this using the UI, whereas, ironically, it was possible before the recent changes to the the visual tags were made. You could use the UI if you put the string into a variable first, and then applied the formatter to the variable.