Skip to main content

Overview

Function blocks transform and manipulate data within your pipeline. IronBullet provides comprehensive function libraries for:
  • String manipulation
  • List operations
  • Cryptographic hashing and encryption
  • Type conversion and encoding
  • Date and time operations
  • Float and integer mathematics
  • Time zone conversions

String Functions

Manipulate text and strings.

Settings

function_type
StringFnType
required
Operation to perform:
  • Replace - Replace text
  • Substring - Extract substring
  • Trim - Remove whitespace
  • ToUpper - Convert to uppercase
  • ToLower - Convert to lowercase
  • URLEncode - URL encode
  • URLDecode - URL decode
  • Base64Encode - Base64 encode
  • Base64Decode - Base64 decode
  • HTMLEntityEncode - Encode HTML entities
  • HTMLEntityDecode - Decode HTML entities
  • Split - Split by delimiter
  • RandomString - Generate random string
  • Reverse - Reverse string
  • Length - Get string length
input_var
string
required
Variable containing input string
output_var
string
default:"RESULT"
Variable name to store result
capture
boolean
default:"false"
Capture as user-visible variable
param1
string
Function-specific parameter (e.g., search string, start index)
param2
string
Function-specific parameter (e.g., replacement string, length)

Examples

{
  "block_type": "StringFunction",
  "label": "URL Encode Email",
  "settings": {
    "type": "StringFunction",
    "function_type": "URLEncode",
    "input_var": "input.USER",
    "output_var": "ENCODED_EMAIL"
  }
}
{
  "block_type": "StringFunction",
  "label": "Replace Spaces",
  "settings": {
    "type": "StringFunction",
    "function_type": "Replace",
    "input_var": "data.USERNAME",
    "param1": " ",
    "param2": "_",
    "output_var": "CLEAN_USERNAME"
  }
}

List Functions

Manipulate arrays and lists.

Settings

function_type
ListFnType
required
Operation to perform:
  • Join - Join array into string
  • Sort - Sort array
  • Shuffle - Randomize order
  • Add - Add item to list
  • Remove - Remove item from list
  • Deduplicate - Remove duplicates
  • RandomItem - Pick random item
  • Length - Get list length
input_var
string
required
Variable containing input list
output_var
string
default:"RESULT"
Variable name to store result
capture
boolean
default:"false"
Capture as user-visible variable
param1
string
Function-specific parameter (e.g., delimiter, item to add)

Example

{
  "block_type": "ListFunction",
  "label": "Join Tags",
  "settings": {
    "type": "ListFunction",
    "function_type": "Join",
    "input_var": "data.TAGS_ARRAY",
    "param1": ",",
    "output_var": "TAGS_STRING"
  }
}

Crypto Functions

Hashing, encryption, and cryptographic operations.

Settings

function_type
CryptoFnType
required
Cryptographic operation:
  • MD5 - MD5 hash
  • SHA1 - SHA-1 hash
  • SHA256 - SHA-256 hash
  • SHA512 - SHA-512 hash
  • SHA384 - SHA-384 hash
  • CRC32 - CRC32 checksum
  • HMACSHA256 - HMAC-SHA256
  • HMACSHA512 - HMAC-SHA512
  • HMACMD5 - HMAC-MD5
  • BCryptHash - BCrypt hash
  • BCryptVerify - BCrypt verification
  • Base64Encode - Base64 encode
  • Base64Decode - Base64 decode
  • AESEncrypt - AES encryption
  • AESDecrypt - AES decryption
input_var
string
required
Variable containing input data
output_var
string
default:"HASH"
Variable name to store result
capture
boolean
default:"false"
Capture as user-visible variable
key
string
Encryption key or HMAC secret (required for HMAC/AES operations)

Examples

{
  "block_type": "CryptoFunction",
  "label": "Hash Password",
  "settings": {
    "type": "CryptoFunction",
    "function_type": "SHA256",
    "input_var": "input.PASS",
    "output_var": "PASS_HASH"
  }
}
{
  "block_type": "CryptoFunction",
  "label": "HMAC Signature",
  "settings": {
    "type": "CryptoFunction",
    "function_type": "HMACSHA256",
    "input_var": "data.PAYLOAD",
    "key": "<data.API_SECRET>",
    "output_var": "SIGNATURE"
  }
}

Conversion Functions

Type conversion and encoding transformations.

Settings

op
ConversionOp
required
Conversion operation:
  • StringToInt - Parse integer
  • IntToString - Convert to string
  • StringToFloat - Parse float
  • FloatToString - Convert to string
  • BoolToString - Convert boolean
  • StringToBool - Parse boolean
  • IntToFloat - Convert to float
  • FloatToInt - Truncate to integer
  • Base64Encode / Base64Decode
  • HexEncode / HexDecode
  • UrlEncode / UrlDecode
  • HtmlEncode / HtmlDecode
  • StringToBytes / BytesToString
  • IntToBytes / BytesToInt
  • BigIntToBytes / BytesToBigInt
  • BytesToBinaryString / BinaryStringToBytes
  • ReadableSize - Format bytes as KB/MB/GB
  • NumberToWords - Convert number to words
  • WordsToNumber - Parse words to number
  • SvgToPng - Convert SVG to PNG
input_var
string
required
Variable containing input data
output_var
string
default:"CONVERTED"
Variable name to store result
capture
boolean
default:"false"
Capture as user-visible variable
encoding
string
default:"utf8"
Text encoding for byte operations
endianness
string
default:"big"
Byte order: big or little
byte_count
number
default:"4"
Number of bytes for integer conversions

Example

{
  "block_type": "ConversionFunction",
  "label": "Decode Base64",
  "settings": {
    "type": "ConversionFunction",
    "op": "Base64Decode",
    "input_var": "data.ENCODED_DATA",
    "output_var": "DECODED_DATA"
  }
}

Date Functions

Date and time operations.

Settings

function_type
DateFnType
required
Date operation:
  • Now - Current date/time
  • FormatDate - Format date string
  • ParseDate - Parse date from string
  • AddTime - Add duration
  • SubtractTime - Subtract duration
  • UnixTimestamp - Convert to Unix timestamp
  • UnixToDate - Convert from Unix timestamp
  • CurrentUnixTimeMs - Current time in milliseconds
  • Compute - Evaluate math expression
  • Round - Round number to decimals
  • DateToUnix - Parse to Unix seconds
  • DateToUnixMs - Parse to Unix milliseconds
input_var
string
Variable containing input date (for parse/convert operations)
output_var
string
default:"DATE"
Variable name to store result
format
string
default:"%Y-%m-%d %H:%M:%S"
Date format string (strftime format)
amount
number
default:"0"
Amount to add/subtract
unit
string
default:"seconds"
Time unit: seconds, minutes, hours, days
capture
boolean
default:"false"
Capture as user-visible variable
param
string
Extra parameter for Compute (expression) or Round (decimal places)

Examples

{
  "block_type": "DateFunction",
  "label": "Current Timestamp",
  "settings": {
    "type": "DateFunction",
    "function_type": "CurrentUnixTimeMs",
    "output_var": "TIMESTAMP"
  }
}
{
  "block_type": "DateFunction",
  "label": "Format Date",
  "settings": {
    "type": "DateFunction",
    "function_type": "Now",
    "format": "%Y-%m-%d",
    "output_var": "TODAY"
  }
}

Float Functions

Floating-point math operations.

Settings

function_type
FloatFnType
required
Math operation:
  • Round, Ceil, Floor, Abs
  • Add, Subtract, Multiply, Divide
  • Power, Sqrt, Min, Max
input_var
string
required
Variable containing first operand
param1
string
Second operand (for binary operations)
param2
string
Additional parameter (e.g., decimal places for Round)
output_var
string
default:"RESULT"
Variable name to store result
capture
boolean
default:"false"
Capture as user-visible variable

Integer Functions

Integer math operations.

Settings

function_type
IntegerFnType
required
Math operation:
  • Add, Subtract, Multiply, Divide
  • Modulo, Power, Abs, Min, Max
input_var
string
required
Variable containing first operand
param1
string
Second operand (for binary operations)
output_var
string
default:"RESULT"
Variable name to store result
capture
boolean
default:"false"
Capture as user-visible variable

Time Functions

Time zone and duration operations.

Settings

function_type
TimeFnType
required
Time operation:
  • ConvertTimezone - Convert between time zones
  • GetTimezone - Get current timezone
  • IsDST - Check daylight saving time
  • DurationBetween - Calculate duration
  • AddDuration - Add time duration
  • SubtractDuration - Subtract duration
input_var
string
required
Variable containing input time
timezone
string
default:"UTC"
Source timezone (IANA format)
target_timezone
string
default:"America/New_York"
Target timezone for conversion
format
string
default:"%Y-%m-%d %H:%M:%S"
Output format string
output_var
string
default:"RESULT"
Variable name to store result
capture
boolean
default:"false"
Capture as user-visible variable