Overview
The Macro Editor in Flowmage allows you to dynamically transform, manipulate, and generate data inside your flows.
Instead of using static values, you can:
Modify text
Work with dates
Build logic
Handle arrays
Encode/decode data
Perform calculations
? This makes your flows dynamic, reusable, and intelligent.
Where to Find It
You can open the Macro Editor by clicking the ƒ (function) icon next to any input field.
Inside nodes like:
AI nodes (Claude, OpenAI)
Integration nodes
HTTP requests
Conditions
Variables
Basic Syntax
Macros are always wrapped like this:
[MACRO]function_name(parameters)[#MACRO]
Example
[MACRO]str_replace(Hoi, doei, Hoi hoe gaat het?)[#MACRO]
? Output:
doei hoe gaat het?
Using Variables
You can combine macros with Flowmage variables:
[MACRO]str_replace(Hoi, doei, @webhook.message@)[#MACRO]
? This lets you dynamically transform incoming data.
Live Preview
The Macro Editor includes a preview panel, so you can instantly see:
Your input
The macro result
⚠️ If you see undefined, it usually means:
A variable is empty
The variable does not exist yet
The flow hasn’t run yet
? Macro Categories
All macros are grouped into categories:
Date
Random
String
Array
Logic
Encoding
HTML
Encryption
JSON
Math
? Date Macros
Used for working with dates and time.
date(format)
Format the current date.
[MACRO]date(Y-m-d)[#MACRO]
date_add(datetime, interval, format)
Add time.
[MACRO]date_add(@now@, 1 day, Y-m-d)[#MACRO]
date_sub(datetime, interval, format)
Subtract time.
date_diff(date1, date2, format)
Difference between two dates.
date_to_timestamp(date, format, lang, tz)
Convert to UNIX timestamp.
date_format(datetime, format, tz)
Change format of a date.
timestamp()
Current UNIX timestamp.
timestamp_to_date(ts, format)
Convert timestamp to readable date.
? Random Macros
Generate random values.
special_random(chars, len, type)
Generate random string.
random_int(min, max)
Random number.
[MACRO]random_int(1, 100)[#MACRO]
uuid()
Generate unique ID.
? String Macros
Most used category — manipulate text.
default(value, fallback)
Fallback if empty.
[MACRO]default(@name@, Unknown)[#MACRO]
concat(values...)
Join strings.
str_replace(search, replace, string)
Replace text.
substr(string, start, length)
Extract part of string.
strlen(string)
Character count.
reverse(value)
Reverse string or array.
repeat(string, count)
Repeat text.
strtolower(string)
Lowercase.
strtoupper(string)
Uppercase.
ucfirst(string)
Capitalize first letter.
ucwords(string, delimiter)
Capitalize words.
trim(string, chars)
Remove spaces or characters.
slugify(string)
Create URL-friendly string.
remove_break_lines(string)
Remove line breaks.
str_contains(string, needle)
Check if contains.
str_starts_with(string, needle)
Check prefix.
str_ends_with(string, needle)
Check suffix.
? Array Macros
Work with lists of data.
unique(values...)
Remove duplicates.
sort(values..., direction)
Sort array.
[MACRO]sort(3,1,2, asc)[#MACRO]
? Logic Macros
Used for conditions and comparisons.
equals(a, b)
Check equality.
not_equals(a, b)
gt(a, b)
Greater than.
gte(a, b)
lt(a, b)
lte(a, b)
? Perfect for use inside conditions or AI prompts.
? Encoding Macros
base64_encode(value)
base64_decode(string)
urlencode(string)
urldecode(string)
? HTML Macros
strip_tags(string)
Remove HTML.
? Encryption Macros
md5(string)
sha1(string)
crc32(string)
? JSON Macros
json_encode(value)
Convert object → JSON.
json_decode(string)
Parse JSON → object.
➗ Math Macros
sum(a, b)
subtract(a, b)
multiply(a, b)
division(a, b)
round(value, precision)
? Real-Life Examples
Clean incoming webhook text
[MACRO]trim(@webhook.message@)[#MACRO]
Generate username
[MACRO]slugify(@user.name@)[#MACRO]
Fallback value
[MACRO]default(@email@, no-email@company.com)[#MACRO]
Add 7 days to current date
[MACRO]date_add(@now@, 7 days, Y-m-d)[#MACRO]
Create unique ID
[MACRO]uuid()[#MACRO]
⚠️ Common Mistakes
❌ Undefined values
Preview shows undefined.
✅ Ensure variable exists or use default()
❌ Wrong syntax
❌ Missing [MACRO]
❌ Wrong parameter order
❌ Using macros outside supported fields
Not all fields support macros.
? Pro Tips
Combine multiple macros for powerful transformations
Always test with preview
Use
default()to prevent errorsKeep macros readable (don’t over-nest)
Use variables everywhere for dynamic flows
Summary
The Macro Editor is one of the most powerful features in Flowmage.
It allows you to:
Transform data
Add logic
Generate values
Build dynamic automations
? Mastering macros = building truly powerful flows.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article