BASE64_ENCODE
Encode text or objects using the Base64 encoding algorithm. Objects are automatically converted to JSON strings before encoding. By default this complies with RFC 4648. Set strict: FALSE for RFC 2045 compliant encoding.
Categories: Data Parsing/Conversion
Syntax
BASE64_ENCODE(text_or_object, [strict: TRUE])
Examples
Example 1
Input
1
{
2
"my_action": {
3
"message": "Hello world"
4
}
5
}
Formula
BASE64_ENCODE(my_action.message)
Output
"SGVsbG8gd29ybGQ="
Example 2
Input
1
{
2
"my_action": {
3
"object": {
4
"message": {
5
"body": "Hello World!",
6
"from": "Tines",
7
"to": "World"
8
}
9
}
10
}
11
}
Formula
BASE64_ENCODE(my_action.object)
Output
"eyJib2R5IjoiSGVsbG8gV29ybGQhIiwiZnJvbSI6IlRpbmVzIiwidG8iOiJXb3JsZCJ9"
Example 3
Input
1
{
2
"my_action": {
3
"long_message": "This is a very long message that will produce base64 output with line breaks when encoded with strict: FALSE"
4
}
5
}
Formula
BASE64_ENCODE(my_action.long_message, strict: FALSE)
Output
"VGhpcyBpcyBhIHZlcnkgbG9uZyBtZXNzYWdlIHRoYXQgd2lsbCBwcm9kdWNlIGJhc2U2NCBv\ndXRwdXQgd2l0aCBsaW5lIGJyZWFrcyB3aGVuIGVuY29kZWQgd2l0aCBzdHJpY3Q6IEZBTFNF\n"
Sample actions
Select an action to inspect
You can also click "Copy actions" and paste them in your Tines story to see how they work.