# Base64
# Overview
Base64 node does the encoding and decoding of a content following the Base64 encoding schemes. This node is primarily used when there is a need to encode binary data that needs be stored and transferred over media that are designed to deal with textual data.
# Setup
# Prerequisites
Not applicable
# Installation
To install the node from designer:
- Go to Add more nodes option on the palette section.
- Check for the Base64 node and click install.
- Once installed, the designer is required to be restarted.
To install the node from CLI:
- Go to your project workspace where you can see your
package.json
file. - Run the below give npm command.
npm i @kumologica/kumologica-contrib-base64
# Technical Details
Properties
- Operation (Optional)
Option for encoding or decoding a message property. - Property (Required)
Variable or Payload which is to be encoded or decoded based on the operation selected.
Supported Operations
Not Applicable
Throws
Base64 node throws the following exception.
- Base64 Encoding Failed
- Base64 Decoding Failed
Returns
Encoded string available under following message structure msg.base64.encodedstring
. Similarly, the decoded string will be available under msg.base64.decodedstring
. Payload or variables will not be overwritten or enriched by this node.
# Develop a Service
Video tutorial
# Instructions
Drag a drop an EventListener node from the palette to the canvas. Open the settings, configure the following and Save.
Display Name : POST /encoding Event Source : Amazon API gateway Verb : POST URL : /encoding
From the security category add Base64 node to the canvas. Open the settings, configure the following and Save.
Operation : Decode Property : msg.payload.testdata
Wire the EventListener node to the Base64 node.
Add a Logger node to the flow and set the Message as
msg.payload.testdata
to print the encoded value. Click Save.Add EventListener End node from the palette to the canvas. Open the settings, configure the following and Save.
Payload : msg.payload.testdata
# Try it
← AnthropicAI BigQuery →