Buttondown Documentation
Template variables are a concept that have multiple names: "mail merges" might be one you're more familiar with if you have a marketing and email background.
The concept is to add snippets in your email that are programmatically replaced when Buttondown sends out an email. This with a little templating logic allows you to customize your content per-subscriber or to repeat certain key concepts in your email without having to change them over and over again.
The unique ID for a given subscriber.
A boolean that is true
if the subscriber is on a paid plan and false
if they are not.
Access to the metadata for a given subscriber
Access to the email address for a given subscriber
Whether or not a subscriber is able to be upsold to a paid subscription
Access to the subscriber type (premium, regular, etc) for a given subscriber
Access to the tag names of a given subscriber
The subject of the email you're sending out
A personalized URL for the given subscriber to unsubscribe with
A generic URL for your subscription page.
The permalink of the email being sent out.
A link to prompt existing free subscribers to upgrade. (Only relevant for paid newsletters.)
A link to prompt existing free subscribers to upgrade. (Only relevant for paid newsletters.) This is the exact same thing as upgrade_url.
The issue number of the email being sent out.
The raw date time of the email being sent out.
An embedded subscribe form for your newsletter, just like the one that appears at the bottom of your archives.
Either 'email' (for emails) or 'web' (for web views).
A random number between two values for things like A/B testing.
Variable | Description |
---|---|
subscriber.id | The unique ID for a given subscriber. |
subscriber.can_view_premium_content | Whether or not a subscriber is able to view premium content. |
subscriber.metadata | Access to the metadata for a given subscriber. |
subscriber.email | Access to the email address for a given subscriber. |
subscriber.can_be_upsold | Whether or not a subscriber is able to be upsold to a paid subscription. |
subscriber.subscriber_type | Access to the subscriber type (premium, regular, etc) for a given subscriber. |
subscriber.tags | Access to the tag names of a given subscriber. |
email.subject | The subject of the email you're sending out. |
unsubscribe_url | A personalized URL for the given subscriber to unsubscribe with. |
subscribe_url | A generic URL for your subscription page. |
email_url | The permalink of the email being sent out. |
upgrade_url | A link to prompt existing free subscribers to upgrade. (Only relevant for paid newsletters.) |
premium_subscribe_url | A link to prompt existing free subscribers to upgrade. (Only relevant for paid newsletters.) This is the exact same thing as upgrade_url. |
email.secondary_id | The issue number of the email being sent out. |
email.publish_date | The raw date time of the email being sent out. |
subscribe_form | An embedded subscribe form for your newsletter, just like the one that appears at the bottom of your archives. Note that this only appears on the web/archive version of your email; it will not appear in the actual emails sent to subscribers. |
medium | Either 'email' (for emails) or 'web' (for web views). |
random_number | A random number between two values for things like A/B testing. |