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

# Spintax Email

Spintax (short for "spinning syntax") is a method used to create multiple variations of an email by using a specific format that allows for randomization. This technique is commonly used in email marketing, cold outreach, and automation tools to personalize messages while avoiding spam filters.

### How Spintax Works

\| Spintax uses curly brackets {} to group different variations of words or phrases, separated by a vertical bar | . When processed by an email automation tool, one random variation is selected for each instance. |

### You can use Spintax within :

Email TemplateJourney EmailsCampaigns TemplatesSequences

### Operations where Spintax can be applied :

Bulk EmailEmail SequencesEmail CampaignSmart Flows

### Example: 1

\| \{Hello | Hi | Howdy} John,I hope you're having a \{great | wonderful | fantastic} day!I wanted to reach out regarding \{our new product | an exciting opportunity | a potential collaboration}. Looking forward to your thoughts!Best, |
James

### Example: 2

\| \{Hi | Hello | Hey} \{\{Contact.firstName}} ,I hope you're having a \{great | productive | fantastic} \{day | week}!I'm reaching out because I noticed \{you’re scaling your team | your company is growing | you’ve been expanding in your industry}, and I thought \{Salesmate | our CRM platform | our smart automation tools} could \{be a good fit | help streamline your workflows | support your sales process}.With \{Salesmate | our platform}, you can: |
\| - \{Automate repetitive sales tasks | Run personalized outreach at scale | Track your entire sales pipeline effortlessly} |
\| - \{Boost response rates with Spintax-powered emails | Personalize communication without extra effort | Get higher engagement on cold emails} |
\| - \{Integrate seamlessly with your existing stack | Connect with your favorite tools | Work smarter, not harder}\{Would it make sense to schedule a quick call this week? | Open to a quick 15-min chat sometime this week? | Let me know if you'd be up for a short call – happy to show you around.}\{Looking forward to hearing from you | Hope to connect soon | Let me know what works best for you},\{Best | Cheers | Warm regards}, |
\{\{Owner.name}}

Each time this email is generated, it will create a unique version by randomly selecting one option from each set.

### Why Use Spintax?

Personalization: Each recipient receives a slightly different version of the email.
Avoiding Spam Filters: Reduces the risk of being flagged as spam due to repetitive content.
Efficiency: Automates email variation creation without manually rewriting each message.

### Examples

```
const spintax \= require('spintax-extended');
//simple:
| spintax.unspin("&#123;Red | White | Blue&#125; water"); //#"Red water" or "Blue water" or "White water" |
//with permutation:
| spintax.unspin("\[Red | White | Blue\]"); //#"RedBlueWhite" or "BlueRedWhite" etc. |
//permutations with separator(s):
| spintax.unspin("\[+\_+Red | White | Blue\]"); //#"Red\_Blue\_White" ... |
| spintax.unspin("\[+&#123;\_ | -&#125;+Red | White | Blue &#123;1 | 2&#125;\]"); //#"White-Blue 2-Red" ... |
```

You may escape special characters if you need:

```
const spintax \= require('spintax-extended');
| spintax.unspin("\[+\\\\++Red | \\\\\[White\\\\\] | Blue\]"); //#"\[White\]+Red+Blue" ... |
```

You can count all possible variations:

```
const spintax \= require('spintax-extended');
| spintax.countVariations("\[+&#123;\_ | -&#125;+Red | White | Blue &#123;1 | 2&#125;\]"); //24 |
| spintax.countVariations("A\[Red | 2 \[+\\\\++Whi | Te\] &#123;1 | 2&#125; | Blue\]"); //24 |
```

You can get the full unspin list:

```
const spintax \= require('spintax-extended');
| spintax.fullUnspinList("\[+&#123;\_ | -&#125;+Red | White | Blue &#123;1 | 2&#125;\]"); |
| spintax.fullUnspinList("A\[Red | 2 \[+\\\\++Whi | Te\] &#123;1 | 2&#125; | Blue\]"); |
```

or random unspin list (unique or not):

```
const spintax \= require('spintax-extended');
| spintax.randomUnspinList("A\[Red | 2 \[+\\\\++Whi | Te\] &#123;1 | 2&#125; | Blue\]",10); //not unique |
| spintax.randomUnspinList("\[+&#123;\_ | -&#125;+Red | White | Blue &#123;1 | 2&#125;\]",10,true); //unique (true as a third argument) |
```

You can get unspin text by index:

```
const spintax \= require('spintax-extended');
| spintax.unspinByIndex("Oh, look, &#123;Red | White | Blue&#125; &#123;water | star | color&#125;!",1); //for index 1 - "Oh, look, White water!" |
```

To check correction of spintax text use `isCorrect` function:

```
const spintax \= require('spintax-extended');
| spintax.isCorrect("\[+&#123;\_ | -&#125;+Red | White | Blue &#123;1 | 2&#125;\]"); //true |
| spintax.isCorrect("\[+\\\\++Red | \\\\\[White\\\\\] | Blue\]"); //true |
| spintax.isCorrect("A\[Red | 2 \[+\\\\++Whi | Te\]&#125;&#123; &#123;1 | 2&#125; | Blue\]"); //false |
| spintax.isCorrect("A\[Red | 2 \[+\\\\++Whi | Te\] &#123;1 | \[2&#125;\] | Blue\]"); //false |
| spintax.isCorrect("\[Red | &#123;White | Blue\]"); //false |
```
