Using snippets
By Clint ParsleyLast updated
In short. A snippet is a block of content with a name and a shortcut that you write once and use in any template. To add one, type # and its shortcut, like #upcoming-webinars, and pick it from the list. SEMAOS fills it in when each email is sent, so editing a snippet changes every email that uses it, running sequences and scheduled broadcasts included.
A snippet is a block of content you write once and reuse in your emails, such as the list of webinars you're running this month. Each one has a name, a shortcut and its content. A snippet is filled in when each email is sent, so when you edit it, every email that uses it picks up the change.
How do I create a snippet?
Open Templates and choose the Snippets tab, then New snippet. Fill in:
- Name: what you'll see in the list, up to 80 characters.
- Shortcut: 2 to 48 lowercase letters, numbers and hyphens, like
upcoming-webinars. Each snippet in your account needs its own shortcut, and you can't change it after you save. To use a different shortcut, create a new snippet. - Content: text with bold, italic, lists and links. Images aren't supported yet.
Snippets belong to the whole account, so anyone on your team can use, edit or delete them. They're on every plan, Free included.
How do I put a snippet in an email?
In a simple template or the one-off composer, type # at the start of a line or after a space, then start typing the snippet's name or shortcut. Pick it from the list with the arrow keys and Enter, or click it. Insert snippet in the editor's toolbar does the same thing.
The snippet goes in as its own paragraph and shows as a chip, like #upcoming-webinars. A # in the middle of a word or a web address doesn't open the list. If nothing matches what you type, the list closes and your # stays as text. A snippet can't go inside a link.
In a designed template, select a text block, then choose Insert snippet. The snippet goes in at the end of that block as its own paragraph. The designed editor shows it as its token, {{snippet.upcoming-webinars}}, not as a chip.
Snippets fill in the body of an email only. A snippet in a subject line or preheader is not filled in and shows as blank. The editor warns you when that happens, and when a snippet no longer exists.
To check how it looks, use Preview in a designed template, or send yourself a test from any editor. Both show the snippet filled in.
What happens when I edit a snippet?
The change applies from the next send of every email that uses the snippet. That includes sequences that are already running and broadcasts that are scheduled. A broadcast that is part-way through sending when you save can send the old version to some recipients and the new version to the rest.
Emails already sent don't change. Your send history keeps the content as it went out.
Can a snippet use merge fields?
Yes, some of them. A snippet can use contact, account and custom fields, the company name and the current date, for example {{contact.first_name | there}}. They're filled in for each recipient, the same way as in the template.
A few things can't go in a snippet, and saving tells you which one is the problem:
- The email footer, unsubscribe link, mailing address and signature. Those belong to the template, so a snippet can never take away the unsubscribe link or address an email needs.
- Another snippet's token.
- A merge field inside a link's address.
- A single
{or}that isn't part of a complete merge field.
Why does my snippet look different from the paragraph around it?
A snippet token on its own line replaces that whole paragraph with the snippet's content. Anything you set on that paragraph in the template, such as its alignment or text style, does not carry over to the snippet. In a designed template the snippet takes on the fonts of the text block it sits in.
If the token shares a line with other text, the snippet goes into that line instead. A snippet with several paragraphs or a list is then joined into the line with line breaks.
What are the limits?
- Up to 500 snippets per account.
- Up to 10,000 characters per snippet, formatting included.
- Up to 50 snippet tokens in one email.
- An email has a size limit once its snippets are filled in. A very large template that uses large snippets can save without a problem and still be refused when it's sent. SEMAOS refuses it rather than send part of it.
Can I delete a snippet?
Only when no template uses it. If one does, SEMAOS refuses the delete and names the templates. Remove the snippet from those templates, then delete it.
If an email has a token for a snippet that doesn't exist, that line is left blank when the email is sent. A fallback written into the token, like {{snippet.upcoming-webinars | See our events page}}, is sent instead.
