> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://docs.intractive.app/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Email integration

# **Email integration**
With the Email integration you connect your Intractive story to your inbox, so you are notified the moment an action takes place in your story.

You can:
* Get an email as soon as a viewer completes an action in your story.
* Choose exactly which action triggers the email, based on the variables in your story.
* Send the notification to any email address you like.
* Use the default email, or write your own subject and message.
* Add story variables to the subject and the text, so every notification already contains the details you need.

Everything is configured per story, so different stories can notify different people with their own trigger and their own message.
# **Before you start**
Make sure you have:
* An active Intractive account with a story you can edit.
* At least one variable in your story that can be updated by the viewer. For example a form that collects a name and email address.
Good to know: the email is not sent at a fixed moment, it is sent when a variable in your story is updated. So the variables you collect in the story determine what you can trigger on, and what you can put in the email.
# **Step 1: Open the integration tab in Intractive**
1. Log in to **Intractive**.
2. Go to your **project** and open your **story**.
3. Open **Integrations**.
4. Select **Email**.

![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/email-1_yrawiq.png)
# **Step 2: Name the integration and set the trigger**
Here you give the integration a name and decide when the email should be sent.
1. Change the **name** of the integration to something recognisable, so you can tell your integrations apart later.
2. Set the **trigger**. The trigger determines when the email is sent, and is linked to the variables in the platform.
3. Select the **trigger conditions** that apply to you.

In this example the story has two variables: **name** and **email**. Both are filled in by the viewer inside the story, and updating them triggers the email integration.



![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/email-3_5ywo1o.png)

| 💡Tip: only tick the variables that are genuinely filled in by the viewer. If you tick a variable that is never updated, the trigger will not fire and no email is sent.

# **Step 3: Configure the recipient and the content**
In step 2 of the integration (**Configuration**) you decide who receives the email and what it says.

Fill in the **email address** the notification should be sent to when the trigger fires. If you do not change anything else, the email is sent using the default layout and text.


![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/email-5_1x495vf.png)

## **Customise the email**
You can also write your own email by switching the toggle on or off. This lets you change:
* The **subject** of the email.
* The **text** of the email.

In both the subject and the text you can insert **variables**, so the notification already contains the details of that specific viewer or story. For example:
* {{@first\_name}} — the name the viewer filled in.
* {{project\_name}} — the name of the project.

Important: don't forget to click Save before you leave the page. As soon as the integration is saved, the connection works immediately.
# **Step 4: Test your integration**

1. After you have saved the integration, refresh your Intractive platform page. This is easy to forget and the most common reason a test seems to fail.
2. **Publish** your story and open the link, or refresh the story page again if you have already published your story.
3. Open your story and complete the action you set as the trigger. In this example that is a content block with a form, where the variables name and email are updated.
4. Check the inbox of the email address you filled in. The notification is sent as soon as the trigger conditions are met.

| Note: you can only test the integration with a published story. If you click preview and then walk through the steps, the email will not be sent.

# **Troubleshooting**
| **What you see** | **What to check** |
| ---- | ---- |
| No email arrives at all | The integration does not send emails from preview. |
| No email after filling in the form | Check your trigger conditions — at least one variable that is actually updated in the story must be ticked. Then confirm the form fields are linked to those variables under Logic. |
| A variable shows up as plain text in the email | Check the spelling of the variable, including the curly brackets: for example {{@first_name}}. A variable that doesn't exist in the story is not replaced. |
| The email arrives but is empty or unexpected | Check whether the toggle for a custom email is on or off. With the toggle off, the default email is sent instead of your own text. |