Merge Tags in Krom Automation: How to Use Dynamic Variables

Merge tags let you pull live data from the triggering event into any action field. Instead of hardcoding a user’s name or email address into an action, you write a placeholder and Krom Automation fills in the real value at the moment the workflow runs.

The syntax is always double curly braces: {{tag_name}}.

Why merge tags matter #

Without merge tags, every automation would be static. You could send an email, but it would say the same thing to every person who received it.

With merge tags, you write Hi {{first_name}}, and each user gets an email addressed to them personally. You write Your order #{{order_id}} has been placed and every customer sees their actual order number. You write {{post_title}} was just published and the notification always references the real post.

Merge tags are what make Krom Automation automations feel personal and relevant rather than generic.

When merge tags get resolved #

Krom Automation resolves merge tags at execution time, right before each action runs.

This is important to understand. The tags are not resolved when you save the workflow. They’re resolved the moment each action step executes, using the live data from the event that fired the trigger.

If a tag isn’t found in the execution context, Krom Automation leaves it as-is in the output. So if you use {{first_name}} but the user didn’t provide a first name, the placeholder appears literally in the email. You can use this behaviour during debugging to quickly spot which tags aren’t resolving.

System tags: always available #

These tags work in every workflow, regardless of which trigger you’re using.

TagWhat it returns
{{site.name}}Your WordPress site name
{{site.url}}Your site’s URL
{{site.admin_email}}The WordPress admin email address
{{admin_email}}Same as {{site.admin_email}}
{{site_name}}Same as {{site.name}}
{{site_url}}Same as {{site.url}}
{{current_date}}Current date and time in MySQL format

User trigger tags #

Available when your workflow uses a User trigger (User Registered, Login, Logout, Profile Updated, Role Changed, Deleted, or Password Reset).

TagWhat it returns
{{user_id}}WordPress user ID
{{user_login}}Username
{{user_email}}Email address
{{display_name}}Display name
{{first_name}}First name
{{last_name}}Last name
{{roles}}User roles (serialized array)
{{phone}}Phone number
{{new_role}}Role just assigned (Role Changed trigger only)
{{old_roles}}Roles before the change (Role Changed trigger only)
{{login_time}}Login timestamp (User Login trigger only)
{{logout_time}}Logout timestamp (User Logout trigger only)
{{reset_date}}Date of password reset (Password Reset trigger only)

Post trigger tags #

Available when your workflow uses a Post trigger (Post Published, Post Updated, Post Deleted, or Post Status Changed).

TagWhat it returns
{{post_id}}Post ID
{{post_title}}Post title
{{post_content}}Full post content
{{post_excerpt}}Post excerpt
{{post_url}}Post permalink
{{post_type}}Post type (post, page, etc.)
{{post_status}}Current post status
{{post_date}}Publish date
{{post_modified}}Last modified date
{{post_author_id}}Author’s user ID
{{post_author_name}}Author’s display name
{{post_author_email}}Author’s email address
{{categories}}Category names (array)
{{tags}}Tag names (array)
{{old_status}}Previous status (Post Status Changed trigger only)
{{new_status}}New status (Post Status Changed trigger only)
{{old_title}}Title before the update (Post Updated trigger only)

Comment trigger tags #

Available when your workflow uses a Comment trigger (Comment Submitted or Comment Approved).

TagWhat it returns
{{comment_id}}Comment ID
{{comment_content}}The text of the comment
{{comment_author}}Commenter’s name
{{comment_author_email}}Commenter’s email address
{{comment_author_url}}Commenter’s website URL
{{comment_author_ip}}Commenter’s IP address
{{comment_date}}Date the comment was submitted
{{comment_approved}}Approval status (0, 1, or spam)
{{post_id}}ID of the post the comment is on
{{post_title}}Title of the post the comment is on
{{post_url}}URL of the post the comment is on

Media trigger tags #

Available when your workflow uses the Media Uploaded trigger.

TagWhat it returns
{{attachment_id}}Attachment post ID
{{file_name}}Original filename
{{file_url}}Public URL of the uploaded file
{{file_type}}MIME type (e.g., image/jpeg)
{{file_extension}}File extension (e.g., jpg, pdf)
{{file_size}}File size in bytes
{{title}}Media title
{{alt_text}}Image alt text
{{uploaded_by_name}}Display name of the user who uploaded the file
{{uploaded_by_email}}Email of the user who uploaded the file
{{width}}Image width in pixels (images only)
{{height}}Image height in pixels (images only)

WooCommerce trigger tags #

Available when your workflow uses a WooCommerce trigger (Order Created or Order Completed in the free version).

TagWhat it returns
{{order_id}}Order ID
{{order.id}}Order ID (nested format)
{{order.status}}Order status
{{order.total}}Order total
{{order.currency}}Currency code (e.g., USD)
{{order.payment_method_title}}Payment method display name
{{order.date_created}}Order creation date
{{customer.email}}Customer’s email address
{{customer.first_name}}Customer’s first name
{{customer.last_name}}Customer’s last name
{{customer.phone}}Customer’s phone number
{{billing.city}}Billing city
{{billing.country}}Billing country code

Step output tags: using results from previous actions #

Some actions produce output that you can use in later steps of the same workflow.

The AI Generate Text action stores its output under a key you define. If you set the output key to my_summary, you can use {{my_summary}} in any action that runs after it.

The HTTP Request action stores its response under a key you configure (default: http_response). Three tags are available from the response:

TagWhat it returns
{{http_response.status}}HTTP status code of the response
{{http_response.body}}Raw response body as a string
{{http_response.json.fieldname}}A specific field from a JSON response body

For the JSON tag, replace fieldname with the actual field name from the response. For example, if the API response includes {"user_id": 456}, use {{http_response.json.user_id}} to get the value 456.

Syntax rules #

Double curly braces

Tags always use {{ and }}. Single braces won’t work.

Dot notation for nested data

Use a period to access a property inside an object. {{order.total}} gets the total from the order object. {{http_response.json.email}} gets the email field from a JSON response.

Bracket notation for arrays

Use {{items[0]}} to get the first item in an array. Array tags are less common in everyday workflows but useful for advanced scenarios.

Arrays and objects are JSON-encoded

If a tag resolves to an array or object (like {{roles}} or {{categories}}), Krom Automation encodes it as a JSON string automatically.

Missing tags stay as-is

If Krom Automation can’t find a tag in the current context, it outputs the placeholder literally: {{first_name}} stays as {{first_name}}. This makes it easy to spot missing or misspelled tags during testing.

Practical examples #

Personalised welcome email subject: Welcome to {{site.name}}, {{first_name}}!

Order confirmation email body: Hi {{customer.first_name}}, your order #{{order_id}} for {{order.total}} {{order.currency}} has been placed.

Admin notification with post details: New post published: {{post_title}} by {{post_author_name}}. Read it here: {{post_url}}

Using AI output in a follow-up email: Run an AI Generate Text action with output key ai_excerpt, then in the next Send Email action use {{ai_excerpt}} in the message body to include the generated text.

Using an HTTP response in a later step: Make an HTTP Request to an external API and store the response as api_result. In a Send Email action that follows, use {{api_result.json.customer_name}} to reference a field from the API’s JSON response.

What are your feelings

Updated on July 16, 2026