> For the complete documentation index, see [llms.txt](https://flapjax.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flapjax.gitbook.io/docs/automations/actions/communication.md).

# Communication

{% hint style="info" %}
The per-action sections below cover each action's fields: which inputs are required, which are optional, the validation rules, and what blocks saving.
{% endhint %}

#### Multi-Language Content

> Communication actions send content in several languages. That covers Send Email, Send SMS, Send WhatsApp, Push Notification and Send via Recommended Channel.\
> \
> Add language variants and each person receives content in their preferred language. A person whose language has no variant gets the default language content.\
> \
> **Attribute-based variants** go further, changing content by a person attribute value. Send different email copy to people on your "Premium" plan and your "Free" plan. Each attribute variant can hold its own language versions.

***

#### Send Email

Send an email to the person moving through the automation. The recipient is **always that person's own email address on file**, so you never type one.

* **Integration**, the connected email provider you send through, such as SendGrid.
* **Send timing**, either immediately or at the recommended time for the recipient.
* **Subject**, the subject line. It takes variables such as the person's name or attributes.
* **Email content**, the body, composed in either editor mode. See [Two ways to write an email](#two-ways-to-write-an-email-text-and-html-source) below. It carries formatting, links and variable insertion.
* **Multi-language support**, language-specific variants of the subject and body, so each person reads their preferred language.
* **Attribute-based personalisation**, content variants driven by a person attribute, say different messaging for "Premium" and "Free" plan members.
* **Consent**, an optional choice of which [consent](/docs/settings/workspace/consents.md) the email goes out under. Only people who allow that purpose receive it.
* **Unsubscribe page**, an optional attachment of one of your unsubscribe pages, which puts an unsubscribe link in the email.
* **Campaign tagging**, an optional campaign and group tag for communications reporting.

#### Send Custom Email

Send an email to **an address you specify**, rather than to the person on file. The address is an ordinary field that accepts a variable, such as a manager's email captured by an earlier action, or a fixed internal inbox. Use it to notify your team or an external system.

* **Integration**, the connected email provider you send through.
* **Email address**, the recipient. It supports variables, such as a manager's email from an earlier action.
* **Subject**, the subject line. It supports variables.
* **Email content**, a rich text editor for the body.

Send Custom Email stays deliberately lean. It carries the recipient, subject and body, and nothing else. Send timing, multi-language variants, attribute-based personalisation, unsubscribe pages, consents and campaign tagging all belong to Send Email.

Consent in particular has no place here. The recipient is an address you typed, not a person whose preferences Flapjax holds.

#### Two ways to write an email: Text and HTML source

Every place you compose an email body offers a mode switch in the editor header. That covers email actions, the ad-hoc send from a person's profile, and the [template editor](/docs/settings/workspace/email-templates.md).

* **Text** is a simple visual editor. Write and format as you would in a document, with bold, links, images and variables from the `{ }` picker, and no HTML knowledge needed. Flapjax wraps your writing in a clean email layout. Most emails belong here.
* **HTML source** gives you the raw HTML, for full control over layout, tables and inline styles. Use it to paste in a designed template, or when you need pixel-level control.

Both modes produce a normal, styled email. The mode changes *how you author*, not the kind of email that goes out. Variables, fallbacks, multi-language variants, unsubscribe links and campaign tagging behave the same in each.

Things to know when switching:

* **HTML source to Text runs one way and can simplify your design.** The editor warns you first. Complex HTML, meaning custom layouts, tables and styles, may flatten into simple formatted text, and one edit in Text mode puts the original markup out of reach. Going the other way, Text to HTML source, is always safe. You simply see the generated HTML.
* **Each email remembers its own mode.** Reopening an action or template returns you to the mode it was written in. New, empty emails open in the mode you used last.
* **Snippets are HTML-source only.** A [snippet](/docs/settings/workspace/email-templates.md#templates-and-snippets) is a fragment spliced into other emails, so it stays raw HTML. Full templates take either mode.

{% hint style="info" %}
**Send Email and Send Custom Email differ on&#x20;*****who*****&#x20;receives the message, and on the feature set.** Send Email always goes to the current person and carries the full personalisation, multi-language, unsubscribe and campaign toolkit. Send Custom Email goes to an address you choose and keeps subject and body alone.

Neither action stores a reference to a saved template. [Email templates and snippets](/docs/settings/workspace/email-templates.md) are an editor convenience that fills the body as you compose. Once saved, the action holds the resolved subject and content, not a template link.
{% endhint %}

***

#### Personalising the subject and body

Any text field on Send Email, and on Send Custom Email, accepts `{{ }}` variables. Flapjax fills them in **per recipient at send time**. See Context Variables & Fallbacks for the full list of what you can insert and how fallbacks resolve.

**Worked example.** Set the subject to:

```
Welcome, {{person.first_name}}!
```

Someone whose first name is *Alex* receives **"Welcome, Alex!"**

A variable with **no value** for a recipient, say a blank `person.first_name`, resolves to an **empty string**. That recipient reads "Welcome, !" Set a **fallback** on the variable to prevent it. Give `person.first_name` a fallback of `there` and anyone missing a first name reads **"Welcome, there!"** instead.

You set fallbacks per variable, and per language on multi-language content.

***

#### Multi-language, worked end to end

Add language variants so one Send Email delivers the right language to each person automatically. Suppose you configure the subject like this:

| Content slot     | Text                             |
| ---------------- | -------------------------------- |
| **Default**      | `Welcome to our service!`        |
| **`fr` variant** | `Bienvenue sur notre service !`  |
| **`de` variant** | `Willkommen bei unserem Dienst!` |

Give the body matching Default, `fr` and `de` variants, and leave **Default language** at `en`, the builder's starting value.

Flapjax then picks content per recipient in this order:

1. **The person's own language.** A person with a language set, say `fr`, and a matching variant gets that variant. Our French speaker reads *"Bienvenue sur notre service !"*
2. **The action's Default language.** A person with no language, or with no matching variant, gets the variant for the action's Default language, `en` here.
3. **The Default content**, delivered when neither of the first two matches.

This runs **per recipient at send time**, so one bulk send delivers French to some people, German to others and the English default to everyone else, all from a single action.

Configure **attribute-based variants** too and the person's attribute value picks the variant set first, falling back to the attribute default. Language then resolves *inside* that set, through the same three steps.

#### Send SMS

Send a text message to the person's mobile number.

* **Integration**, the messaging provider you use, such as Twilio.
* **Consent**, an optional choice of which [consent](/docs/settings/workspace/consents.md) the message goes out under.
* **Send timing**, either immediately or at the recommended time.
* **Message content**, a text editor with variable insertion.
* **Multi-language support**, for language-specific variants.

#### Send WhatsApp

Send a WhatsApp message to the person's mobile number.

* **Integration**, the connected WhatsApp provider.
* **Send timing**, either immediately or at the recommended time.
* **Message content**, a text editor with variable insertion.
* **Multi-language support**, for language-specific variants.

#### Send to Slack

Post a message to a Slack channel.

* **Integration**, the connected Slack workspace.
* **Message content**, the message you post.

#### Send to Microsoft Teams

Post a message to a Microsoft Teams channel.

* **Integration**, the connected Teams workspace.
* **Message content**, the message you post.

#### Send to Telegram

Send a Telegram broadcast message.

* **Integration**, the connected Telegram bot.
* **Message content**, the message you send.

#### Send via Recommended Channel

Pick the channel each person most likely engages with, from email, SMS and WhatsApp, then send through it. You configure one action once, with an email and a message both ready, and Flapjax chooses per person.

* **Default channel**, the fallback for any recipient with no recommendation, or an unreachable recommended channel. Pick Email, SMS or WhatsApp.
* **Send timing**, either immediately or at the recommended time.
* **Email configuration**, holding the integration, subject and email content, in the Email tab.
* **Message configuration**, holding the integration and message content, in the Message tab, shared by SMS and WhatsApp.

Both tabs support multi-language and attribute-based personalisation.

**How the channel is chosen.** The person's own communication history drives the choice, rather than a static preference field. Per person, at send time:

1. **Read their channel engagement.** Flapjax computes engagement metrics from the person's recent communication history: email and SMS sends, deliveries, opens, clicks, bounces, unsubscribes, and how recently they last engaged. Those metrics cover email and SMS. WhatsApp has no engagement history of its own.
2. **Check there is enough signal.** A person with no history, or history too thin for confidence, goes straight to your **Default channel**. Confidence rises with volume and engagement. A recommendation needs a meaningful number of past sends and a reasonable engagement rate behind it.
3. **Rank the channels.** With enough signal, Flapjax scores email and SMS on a weighted blend of delivery rate, engagement rate, conversion rate and recency, minus a penalty for negative signals such as bounces, unsubscribes and spam reports. The higher score wins the recommendation.
4. **Confirm it is reachable, or fall back.** The recommended channel runs only for a person who holds the contact detail **and** the consent: an email address with email consent, or a mobile number with SMS or WhatsApp consent. An unreachable recommendation falls back to your **Default channel**, if that is reachable, and otherwise to any other reachable channel, trying Email, then SMS, then WhatsApp.

Choose **send at the recommended time** and Flapjax schedules the message for the hour of day that person has engaged most, drawn from their open and click history. An hour falling within roughly an hour of now sends immediately instead.

Later actions can read back which channel went out, and whether it came from the recommendation or a fallback.

#### Push Notification

Send a push notification through a connected provider.

* **Integration**, the connected push notification provider.
* **Event**, an event identifier for the notification.
* **Title**, the notification title. It supports variables and multi-language variants.
* **Content**, the notification body, with the same support.
