Base64 Encode Node

The Base64 Encode Node allows you encode a string or binary array on the payload into a Base64 string and store it elsewhere in the payload for later use.

This node is only available in Embedded Workflows. If you would like to encode data in any of the other workflow classes, you can do so using the {{encodeBase64}} helper.

Base64 Encode Node

Configuration

The Base64 Encode Node takes two properties for its configuration.

Source Path

First, enter a payload path to a string or binary array.

Destination Path

Next, enter a payload path where the result of the transformation should be placed. The result will be a Base64 encoded string.

If the source path value is not a string or a binary array, the transformation will fail.

Node Example

In the following example payload, the workflow will encode the string at data.stringToEncode path and place the Base64 encoded string at the working.result path.

{
  "data": {
    "stringToEncode": "My string"
  },
  ...
}

The payload after execution of the Base64 Encode Node would look like:

{
  "working": {
    "result": "TXkgc3RyaW5n"
  },
  ...
}

Node Errors

In the case that the provided input is not a valid array of numbers or a string, the workflow will error.

Was this page helpful?


Still looking for help? You can also search the Losant Forums or submit your question there.