Use the base64Encode helper to encode a given string or field value into UTF-8. Since this helper produces raw encoded output, Celigo recommends using triple braces ({{{ }}}). base64Encode only supports concatenation, not encoding formats.
{{{base64Encode base64String}}}
-
base64String: The input string or field (e.g.,
record.connection.http.unencrypted.apiKey) to be encoded.
-
Encoding a single field
{{{base64Encode record.email}}}If
record.emailis"jane.doe@example.com", it becomes something like"amFuZS5kb2VAZXhhbXBsZS5jb20=". -
Combining username and password
{{{base64Encode (join ":" connection.http.unencrypted.username connection.http.encrypted.secret)}}}If
username=aliceandsecret=hunter2, thejoinform returnsYWxpY2U6aHVudGVyMg==(base64ofalice:hunter2).
Tip
-
Always use triple braces (
{{{ }}}) to prevent Celigo’s automatic quoting or formatting of the encoded string. -
Make sure your input is a valid string; otherwise, the helper may produce unexpected output or an error.