Variables
Typed, reusable {{values}} that resolve in drafts, templates, and rules.
Variables let you define a value once and reference it everywhere — drafts, templates, AI prompts, and rule conditions — so you never paste the same thing twice and every reference stays in sync.
Defining a variable
Variables live in four scopes: global (your account settings), folder (a context folder), profile (a client profile), and thread (a one-off override on a specific conversation). You reference any variable with the same syntax regardless of scope: {{variable_name}}.
Variable names are lowercase with underscores. They can hold short strings — a URL, a number, a name, a date. They are not designed for multi-paragraph content; use templates for that.
Name variables for readability
Built-in variables
Aiemaily resolves the following variables automatically. You don't need to define them — they are always available in any context.
| Variable | Resolves to | Example output |
|---|---|---|
| {{first_name}} | Recipient's first name (from contact) | Maya |
| {{name}} | Recipient's full name (from contact) | Maya Patel |
| {{date}} | Today's date, locale-formatted | June 13, 2026 |
| {{day}} | Day of the week, locale-formatted | Saturday |
| {{time}} | Current local time (sender's timezone) | 9:41 AM |
Locale-aware output
Resolution order
When the same variable name exists at more than one scope level, the most specific scope wins. The agent resolves in this order, stopping at the first match:
- 1
Thread
A value pinned to the current conversation overrides everything. Use thread-level variables for one-off exceptions — a special price, a custom deadline — without changing your global or profile defaults.
- 2
Contact
Variables defined on an individual contact (address-level). Useful for personal details that differ from the company profile.
- 3
Profile
Variables from the active client profile (domain- or address-scoped). These are the primary source for client-specific facts like {{renewal_date}} or {{account_tier}}.
- 4
Folder
Variables set on the context folder the profile belongs to. Shared across all profiles in that folder — good for category-wide values like {{support_email}} or {{contract_type}}.
- 5
Global
Your account-level defaults. Every compose session has access to globals: your {{calendar_link}}, {{company_name}}, {{pricing_page}}, and any other values you want available everywhere.
Using variables in templates and prompts
Paste {{variable_name}} anywhere in a template body, a rule condition value, or an AI prompt instruction. Variables resolve before the AI generates text, so the model sees the actual value — not the placeholder.
If a variable is referenced but has no value in any scope, the agent flags it as unresolved before sending rather than leaving a raw {{placeholder}} in your email.
Hi {{first_name}},
Just a reminder that your {{account_tier}} subscription renews on {{renewal_date}}. As always, your dedicated link is {{calendar_link}} if you'd like to talk before then.
Warm regards,
{{sender_name}}
Unresolved variables block send
Frequently asked
Feature overview
Rules & Brain
Ready to try it?
Start free