Using variables and links in the template editor

Variables

You can use variables in your email which allows you to put in dynamic data. For example dates, usernames, URLs. Variables can be used in all template elements (text, button, table, list).

1. Use a variable in the following format: {variable}

Example:

You’ve recently canceled your Sidemail subscription. Per your request, your subscription was canceled on {cancelation_date}.

2. Pass a value when making an API call

You can see all variables that are used in a template in the Template detail (click on the name of a template on the Templates page of your project)

Example:

"templateProps": {
"cancelation_date": "14.3.2019"
}

Use exactly the same key name (whitespace sensitive and case sensitive) as you did in the email template and the value will be used. Keys are required to be type string. Visit Sending emails section for more details.

When creating your email template, you can create hyperlinks for an URL using the standard Markdown syntax: [Example link](example.com). Links can be used in text, table and list elements (not buttons).

Example: Read our [API docs](https://docs.sidemail.io/api)

You should always include HTTP or HTTPS in the URL otherwise links viewed in clients like Outlook won't be clickable. Outlook displays URLs without a protocol in [link-without-protocol.com] brackets.

Variables can be used also in links, but only as a URL parameter, not as a label.

Example: [Sign in to your account]({sso_url})