Variable syntax
Most string fields in a blueprint accept variables — placeholders that resolve at runtime to context-specific values. Variables use double curly braces: {{post.title}}.
Basic usage
When a feature, job, or report runs, Clautron substitutes any {{variable}} tokens in string fields with their current values.
{
"type": "send_email",
"to": "admin@example.com",
"subject": "New post: {{post.title}}",
"body": "Author: {{post.author.display_name}}\nURL: {{post.permalink}}"
}
Available variable namespaces
{{post.*}} — current post
Available when triggered by save_post or any post-related hook.
{{post.id}},{{post.title}},{{post.content}},{{post.excerpt}}{{post.status}},{{post.type}},{{post.permalink}}{{post.author.id}},{{post.author.display_name}},{{post.author.email}}{{post.meta.KEY}}— any post meta field{{post.terms.TAXONOMY}}— comma-separated term names in a taxonomy
{{user.*}} — current user
{{user.id}},{{user.login}},{{user.email}}{{user.display_name}},{{user.first_name}},{{user.last_name}}{{user.roles}}— comma-separated list of role slugs
{{site.*}} — site info
{{site.name}},{{site.url}},{{site.admin_email}}{{site.timezone}},{{site.locale}}
{{date.*}} — current time
{{date.now}}— ISO 8601 timestamp{{date.today}}— YYYY-MM-DD{{date.year}},{{date.month}},{{date.day}}{{date.timestamp}}— Unix timestamp
{{trigger.*}} — trigger payload
Whatever data the trigger passed in. For save_post this includes {{trigger.post_id}}; for rest_api triggers it includes the request body.
{{previous.*}} — previous action results
If an action stores its result, subsequent actions can reference it. Example: a data_query action stores results, then a send_email action uses them.
{{previous.query.count}} // number of rows returned
{{previous.query.first.title}} // first row's title field
Filters & modifiers
Append filters with the pipe character to transform values:
{{post.title|upper}} UPPERCASE
{{post.title|lower}} lowercase
{{post.title|truncate:50}} Truncate to 50 chars
{{post.content|strip_tags}} Remove HTML
{{date.now|format:Y-m-d}} Format date
{{post.permalink|url_encode}} URL-encode
Default values
Provide a fallback if the variable is missing:
{{post.meta.subtitle|default:No subtitle}}
Variables resolved into HTML output are automatically escaped. To intentionally allow HTML, use the
|raw filter — but only if you trust the source.