> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unifygtm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Snippets

> Reuse email copy with variables and fallback text.

export const ThemedImageFrame = ({lightSrc, darkSrc, alt, caption}) => <Frame caption={caption}>
    <div className="block w-full dark:hidden">
      <OptimizedImage className="w-full" src={lightSrc} alt={(alt ?? caption) ?? ""} />
    </div>
    <div className="hidden w-full dark:block">
      <OptimizedImage className="w-full" src={darkSrc} alt={(alt ?? caption) ?? ""} />
    </div>
  </Frame>;

## Overview

Snippets are reusable blocks of text you can insert into sequence emails. Use
one for an opening question, a description of your product, or a closing line
that you want to reuse across sequences.

A snippet can contain [template variables](/reference/sequences/personalization/template-variables)
and a fallback. For example, an opening question can name the recipient's
company when that value is available and use “your team” when it is missing.
For text generated from a prompt, use a
[smart snippet](/reference/sequences/personalization/smart-snippets).

## Create a snippet

<Steps>
  <Step title="Name the snippet">
    Open [**Snippets**](https://app.unifygtm.com/dashboard/snippets), click
    **New snippet**, and choose **Snippets**. Give it a name that describes the
    copy, such as “Company research opener.”
  </Step>

  <Step title="Write the content and fallback">
    Enter the reusable text under **Content**. Type `{` where you want to insert
    a variable, then choose its field.

    Under **Fallback**, write the complete text that should replace the snippet
    if a variable is missing. The fallback replaces the whole snippet, so it
    should make sense in the same position in your email.

    <ThemedImageFrame lightSrc="/images/reference/sequences/snippet-fallback-light.png" darkSrc="/images/reference/sequences/snippet-fallback-dark.png" alt="A snippet with a company-name variable and a fallback question that uses your team instead." />
  </Step>

  <Step title="Choose access and save">
    Under **Settings**, choose who can use and edit the snippet. Click **Create**
    to save it in your snippets library.
  </Step>
</Steps>

## Use a snippet in a sequence

Open an email step in the sequence builder. Place your cursor where the text
belongs, type `;`, and select your snippet. You can also open the picker with
the scissors icon in the editor toolbar.

Expand the preview using the arrow beside the editor. Choose a person under
**To** to review their version of the email. Turn on **Fallback** to check that
the fallback reads naturally with the surrounding copy.

## Add variations

To offer several versions of the same text, click **Add variant** in the snippet
editor and write another version. Unify randomly selects one variant when it
prepares the snippet for a recipient. Each variant should serve the same purpose
and work with the same fallback.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.