Skip to main content

Using Macros in Training Modules

Learn how to use content macros inside training modules: what they are, how to add them, and a full reference of available macros.

Overview

Macros let you personalize the text inside your training modules — automatically inserting the right name, company detail, or date for each learner when they view the module.


How to add a macro to a training module

  1. Find the macro you want in the reference table below.

  2. Copy the macro key exactly as written.

  3. Paste it into the text content of your training module.

  4. Add a fallback value if required (see Fallback values section below).

  5. Preview the module to confirm the macro resolves correctly before publishing.


Fallback values

Some macros depend on data that may not be filled in for every employee. For example, a manager's name or department. These are marked Fallback Required (✅) in the tables below.

When the data is missing, the macro renders as blank text. To avoid this, add a fallback value using | default: '[your text]' inside the macro:

{{manager.name | default: 'your manager'}}

In this example, if the learner has a manager assigned, the macro displays their manager’s name. If not, it displays "your manager" instead.


Available macros for training modules

Macros marked ✅ require a fallback value — see Fallback values section above.

Employee info

Where to find these values: Employee information is set under Workspace > Employees.

Macro

Description

Example output

Fallback Required?

{{user.first_name}}

Learner's first name

Leah

{{user.full_name}}

Learner's first + last name

Leah Stewart

{{user.email}}

Learner's email address

{{user.department}}

Learner's department

Product

{{user.location}}

Learner's location

NYC

{{user.email_provider}}

Microsoft vs Gmail

Microsoft

{{user.email_domain_base}}

Email domain without .com

adaptivesecurity

{{user.initials}}

First + last initial

LS

{{user.organization}}

Learner's organization

Adaptive

{{user.training_link}}

Personal training link

Company info

Where to find these values: Company information is set under Settings > Company Profile.

Macro

Description

Example output

Fallback required?

{{company.name}}

Company name

Adaptive Security

{{company.city}}

Company city

New York

{{company.executive_full_name}}

Executive full name

Brian Long

{{company.executive_first_name}}

Executive first name

Brian

{{company.security_protocol}}

Security reporting instructions

Reach out to [email protected].

{{company.security_contact_email}}

Security contact email

{{company.domain}}

Company website domain

adaptivesecurity.com

{{company.domain_with_typo}}

Typo variant of company domain

kicks.com [rather than knicks.com]

{{company.logo_url}}

Company logo URL

{{company.executive_username}}

Executive first name, lowercase

brian

{{company.executive_username_full}}

Executive full name, lowercase, no space

brianlong

{{company.admin_app_base_url}}

Company admin URL

{{company.zoom_phishing_exec_deepfake_url}}

Executive deepfake audio URL

Manager info

Where to find these values: Each employee’s manager info is set under Workspace > Employees > Direct Manager field.

Macro

Description

Example output

Fallback required?

{{manager.name}}

Learner's manager full name

Andrew Jones

{{manager.first_name}}

Learner's manager first name

Andrew

{{manager.email}}

Learner's manager email

Relative time

Macro

Description

Example output

Fallback required?

{{date.today}}

Today's date

1/1/26

{{date.yesterday}}

Yesterday

12/31/25

{{date.tomorrow}}

Tomorrow

1/2/26

{{date.minus_7d}}

One week ago

12/25/25

{{date.plus_7d}}

One week from now

1/8/26

{{time.now}}

Current time

12:00 PM

{{time.minus_1h}}

One hour ago

11:00 AM

{{time.plus_1h}}

One hour from now

1:00 PM


Tips

  • Preview before publishing. Click Preview on your module overview page to confirm all macros resolve correctly and no values appear blank.

  • Always add fallbacks for macros marked Fallback Required. If a field isn't populated for an employee, the macro will render blank for users taking the training.

  • Only use macros from the list above. Any other macro key will render as an empty string.

Did this answer your question?