---
title: "Email Channel"
url: https://flexie.io/resources/inbox/email
description: "Connecting a mailbox (Google, Microsoft, Other), composing replies and forwards, how incoming email is handled and threaded, the two email workflow triggers (Incoming emails and Email opened) plus the Save email attachments to the customer action."
---

# Email Channel

Last updated 26 May 2026

![An email conversation in the Flexie inbox with reply, reply all, and forward actions, plus the Incoming emails trigger wiring shown alongside](https://flexie.io/image/resources/inbox-email.png)

Each user connects their own mailbox to Flexie. From then on, email shows up in the shared inbox the moment it lands on the server, gets filed to the right customer automatically, and any incoming message can start a workflow.

In the inbox, a channel switcher lets you narrow the view to **Email**. Mailbox accounts are configured per user, each user connecting their own.

## What "the email channel" is

Each user connects one or more **mailbox accounts** to Flexie. From then on:

* New messages in those mailboxes appear in the shared inbox and on the customer's timeline.
* The user can compose, reply, and forward right from the inbox.
* Outbound mail is sent through the same account, so the recipient sees the message coming from the user's normal address.

A user can have multiple mailboxes (work address plus personal alias, or two team addresses). One is marked as the **default** for compose.

## Connecting a mailbox

Each user adds their own mailbox accounts from their user profile, using **Add Email Account**.

There are three "kinds" of accounts. The kind you pick changes which fields you fill in:

Google

Sign in with your Google account. The server settings are filled in automatically and locked.

Microsoft

Sign in with your Microsoft account. The server settings are filled in automatically and locked.

Other

Standard incoming/outgoing server connection. See the fields below.

### The form fields

| Field                          | What it is                                                                                                                                                                                              | Default for _Other_          |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
| **Account Name**               | Friendly label shown in the account picker                                                                                                                                                              | (yours)                      |
| **Choose your email provider** | Google / Microsoft / Other (button row). Picking Google or Microsoft prefills and locks the server settings below.                                                                                      | (none)                       |
| **IMAP server**                | Hostname of the incoming mail server                                                                                                                                                                    | (yours)                      |
| **IMAP port**                  | Incoming port                                                                                                                                                                                           | 993                          |
| **IMAP encryption**            | TLS / STARTTLS / SSL / None                                                                                                                                                                             | TLS                          |
| **SMTP server**                | Hostname of the outgoing mail server                                                                                                                                                                    | (yours)                      |
| **SMTP port**                  | Outgoing port                                                                                                                                                                                           | 587                          |
| **SMTP encryption**            | TLS / STARTTLS / SSL / None                                                                                                                                                                             | TLS                          |
| **Email Address**              | The address being connected                                                                                                                                                                             | (none)                       |
| **Email Password**             | Your mailbox password. Only used with _App Password_ or _User Password_ auth (see [Auth Type](#auth-type-xoauth2-app-password-user-password) below).                                                    | (none)                       |
| **Append Emails**              | Yes / No. When on, every email Flexie sends is also written to your server's _Sent_ folder, so it shows up in your normal mail clients. See [Append Emails, explained](#append-emails-explained) below. | (none)                       |
| **Default Email**              | Yes / No. If Yes, this account is the one used when you click **Compose** without picking an account first.                                                                                             | (none)                       |
| **Sync Calendar**              | Yes / No, pull calendar entries from this account into Flexie's calendar.                                                                                                                               | (none)                       |
| **Auth Type**                  | Which sign-in method Flexie uses to talk to your mailbox: **XOAUTH2**, **App Password**, or **User Password**. See [Auth Type](#auth-type-xoauth2-app-password-user-password) below.                    | XOAUTH2 for Google/Microsoft |

For Google or Microsoft, you'll be redirected through the standard sign-in flow; you don't fill in server settings or a password.

### Auth Type: XOAUTH2, App Password, User Password

Three options for the _Auth Type_ dropdown:

**XOAUTH2** is the secure OAuth flow used by Google Workspace and Microsoft Azure. When you sign in through Google or Microsoft, you go through their consent screen and Flexie gets a refresh token; no password is stored. This is the default (and recommended) option when you pick Google or Microsoft as the provider.

> Using XOAUTH2 across a whole organisation needs a one-time setup on the Google Workspace or Microsoft Azure side: a domain-wide app authorisation that lets Flexie read mailbox data on behalf of your users. The Flexie team can do this with you if you'd like a hand.

**App Password** is for _Other_ providers with two-factor authentication on. You generate a separate password from your mail provider's account settings, specifically for software clients like Flexie, and paste it into the **Email Password** field. The app password lets Flexie sign in without ever touching your normal login password.

**User Password** is your regular mailbox password. The least secure option, kept for older providers that don't offer an app-password flow. Avoid when you can.

### Append Emails, explained

Whether this needs to be on depends on your mail provider.

**Google and Microsoft handle Sent for you.** Their servers file a copy of every SMTP-sent message into the **Sent** folder automatically, so Flexie-sent emails already show up in Gmail, Outlook, and your phone's mail app alongside everything else. Leave **Append Emails** off for Google or Microsoft accounts; turning it on would just create duplicates.

**Smaller mail providers usually don't.** A mailbox that came with a web-hosting bundle (cPanel, Plesk, a generic IMAP server) typically treats SMTP and IMAP as separate services, with nothing copying outbound mail into Sent on its own. For those, set **Append Emails = Yes** and Flexie will write a copy of every outbound message into the **Sent** folder over IMAP, so your other mail clients still see what Flexie sent.

> Rule of thumb: **Google / Microsoft → off.** **Hosting-bundle email or any plain IMAP server → on.**

### Aliases (extra "From" addresses)

If your mailbox supports sending as several addresses (e.g. `sales@…` and `support@…` both delivered to the same inbox), add each one as an **alias** under the same account. Aliases let you pick the **From** address at compose time without setting up a second mailbox.

### After saving: first sync

Once the account is saved, Flexie does an initial backfill of recent history. From then on, new mail is **pushed the moment it comes in**: Flexie holds an open IMAP IDLE connection to the server, so messages land in the inbox within a second of the mail server receiving them. If the IDLE connection drops, a short fallback poll keeps the inbox current until the push channel reconnects. Sent items get copied back into the server's _Sent_ folder if **Append emails** is on.

> Adding an account adds a row to your **Email Accounts** list with a coloured status dot. Red means the last sync failed, usually wrong password, blocked sign-in, or a missing app password. Hover the dot for the last error.

## Mailbox folders

Each connected account exposes its folder tree (Inbox, Sent, Drafts, Trash, Spam, plus any custom folders you've created on the server). When you're in the email channel, the sidebar shows the folder tree of the selected account. Each folder has its own row count.

The shared inbox in the **Email** channel shows messages across **all your connected accounts' Inbox folders** combined, the view that matters most day-to-day. To look at _Sent_ or a custom folder, switch to that account's folder list from the sidebar.

## Sending email

### From the inbox

In the conversation view, three actions sit above the body:

* **Reply**: replies to the sender of the last message.
* **Reply All**: replies to the sender plus everyone in the To/CC list.
* **Forward**: composes a new message with the original quoted in.

The compose form has:

* **From**: your default account, or any of its aliases.
* **To**, **Cc**, **Bcc**: multi-value email pickers; entering a name auto-completes against your contacts, leads, and accounts.
* **Subject**: pre-filled with `Re:` / `Fwd:` for reply/forward.
* **Body**: rich HTML editor with images, links, formatting.
* **Attachments**: upload from your computer, attach a Flexie file (e.g. a quote or invoice PDF), or insert from any saved attachment.
* **Send-later schedule**: quick presets ("This afternoon", "Tomorrow morning", a custom date/time) or **Send now**.
* **Template**: paste a saved email template into the body.

### From a customer's page

Open a contact, lead, account, deal, or case → click **Compose** (or the email icon in the timeline) → the same form opens with **To** pre-filled to the customer's primary email.

This route also lets you attach a related document (e.g. a quote or invoice PDF) in one click.

### From a workflow

The workflow action **Send email** runs the same send path. See [Workflows & automation](https://flexie.io/resources/inbox/workflows-and-automation).

## How incoming email is handled

Each connected mailbox holds an open **IMAP IDLE** channel to the server, so the moment a new message lands on the server, Flexie picks it up. The saved message keeps the sender, recipients, subject, body (both plain text and HTML), attachments, and read state.

### Grouping into conversations

Flexie follows the reply chain. A reply to an existing message stays in the same conversation, and replies you send through Flexie are set up so the recipient's email client also threads them with the original. When the reply chain isn't clear (e.g. a forwarded thread with the headers stripped), subject normalisation kicks in as a fallback: "Re:" and "Fwd:" prefixes are stripped for the grouping check.

### Auto-linking to a customer

While the message is being saved, Flexie looks for any record whose email field matches the sender's address (and the recipient's address for outbound copies). All matches get the message on their timeline. If nothing matches, the message still lands in the inbox and shows up under **Not linked**.

### Attachments

Files attached to a message can be either:

* **Standard attachments**: shown in the _Attachments_ row of the message.
* **Inline images**: embedded inside the HTML body (logos in a signature, screenshots pasted into the message).

The files themselves are stored in Flexie's attachments system and shown inline in the email view.

## Workflow triggers: email

Email gives you two triggers to choose from.

### Incoming emails

Use this when you want a workflow to react to **mail coming in**. It runs every time a new email lands in one of your connected mailboxes. You can narrow it down to a specific account, a specific folder, only unread mail, only replies, and so on.

**Form fields:**

* **Email account**: which connected account this trigger watches.
* **Folder(s)**: which folders within that account (typically _Inbox_).
* **Read emails**: _Any_ · _Read emails_ · _Unread_.
* **Reply emails**: _Any_ · _New_ (first message in a thread) · _Reply_ (a message that's responding to something).

**Runs against:** every customer record the email was linked to (the trigger runs once per matched record).

**What your workflow can use from the email.** Flexie exposes the incoming email's fields under `incoming_email` in your workflow data (usable from [Flexie Scripting](https://flexie.io/resources/flexie-scripting/overview)):

```twig
{{ __data.incoming_email.from_email }}
{{ __data.incoming_email.from_name }}
{{ __data.incoming_email.subject }}
{{ __data.incoming_email.text }}              {# plain-text body  #}
{{ __data.incoming_email.html }}              {# HTML body         #}
{{ __data.incoming_email.cc_emails[0] }}      {# array of strings  #}
{{ __data.incoming_email.cc_names[0] }}
{{ __data.incoming_email.date_received }}
{{ __data.incoming_email.has_inline_attachments }}
{{ __data.incoming_email.has_regular_attachments }}
{{ __data.incoming_email.all_attachments_count }}
{% for a in __data.incoming_email.all_attachments %}
  {{ a.name }} — {{ a.mime }} ({{ a.size }} bytes)
{% endfor %}

```

> **Use cases:** customer replies to an inactive thread → workflow re-opens the case · email from `billing@…` → auto-categorise as a billing query · email has an attachment named `*.signed.pdf` → mark the deal as **Contract signed**.

### Email opened

Use this when you want a workflow to react the moment **the recipient actually opens** an email you sent through Flexie. Opens are tracked by a tiny invisible image embedded in the message body.

**Runs against:** the customer the email was sent to.

This trigger is a "this happened" signal, useful for branching ("if the email was opened in 24h, do X; if not, follow up"). It doesn't make any extra fields available to the workflow on its own.

## The "Save email attachments to the customer" action

Closely tied to the email channel: a workflow action that takes the attachments off an inbound email and saves them against the linked customer's **Attachments** tab.

Typical recipe:

1. **Trigger:** Incoming emails, sender = `clients@…`.
2. **Action:** Save email attachments to the customer.
3. **Action:** Update field, `Last document received = {{ now() }}`.

After step 2, the linked contact, deal, or case has the attachment files in its own attachments collection. They survive even if the email is later deleted.

## Limits and gotchas

* **Big attachments**: there's a per-message attachment size cap; very large files will refuse to attach at send time with a clear error.
* **App passwords**: for _Other_ providers with two-factor authentication on, you'll need to generate an app password rather than entering your normal one. The provider's own help docs will tell you how.
* **Forwarded threads**: if the user clicks **Forward** rather than **Reply**, threading breaks intentionally (forward = new conversation with new recipients). The original is quoted in the body but the new message stands on its own.
* **The "Sent" folder** depends on **Append emails**. With it off, the server has no record of the message, only Flexie does. Keep it **on** if you want your sent items to show up in your phone's mail app.

## Next

* [SMS](https://flexie.io/resources/inbox/sms): the next channel.
* [Templates](https://flexie.io/resources/inbox/templates): saved replies, with variables.
* [Workflows & automation](https://flexie.io/resources/inbox/workflows-and-automation): the full trigger catalogue and the send actions.
