Variables and personalization

How template {{ }} placeholders are filled at send time — from payload variables, contact attributes and event payloads.

Templates use placeholders in the {{ name }} format. At send time, Publiq replaces them with the matching values. A missing variable becomes an empty string (never breaks the email).

Where values come from

  • Direct send (emails.send) — you pass variables: { ... } in the payload.
  • Contact attributes — if the recipient is a contact, its attributes are included automatically.
  • Automations — the event payload that triggers the automation becomes the send step variables.

In automations, precedence is: contact attributes first, then the event payload (which overrides on conflict). In the HTML body values are escaped (anti-injection); in subject/text, literal substitution.

The unsubscribe link is special: use {{{PUBLIQ_UNSUBSCRIBE_URL}}} (triple braces) and Publiq injects the signed URL automatically.

Variables and personalization — Publiq Docs