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

# Adapty Mail integration: email campaigns

> Connect Adapty Mail to FunnelFox to turn funnel leads into email campaigns. Forward profiles, purchases, and subscription changes automatically.

The Adapty Mail integration forwards the emails you collect in your funnels,
along with each customer's purchase history, into Adapty Mail. Campaigns there
can then nurture leads who never bought and win back customers who cancelled,
hit a billing issue, or churned.

To learn what Adapty Mail can do, go to the
[Adapty Mail documentation](https://adapty.io/docs/adapty-mail).

<Frame>
  <img src="https://mintcdn.com/funnelfox/tqU_j3A9t_9KFvyV/assets/adapty-mail-overview.png?fit=max&auto=format&n=tqU_j3A9t_9KFvyV&q=85&s=ce1af45462430698c87c8d1eaf8652a6" width="1920" height="989" data-path="assets/adapty-mail-overview.png" />
</Frame>

## How it works

The integration is a one-way push into a single Adapty Mail project.

FunnelFox
sends people and their purchase history, but never reads your campaigns back
and never sends email itself.

When a user interacts with a funnel:

1. **Profile creation**: FunnelFox sends the profile when a funnel collects an
   email. Repeat submissions update the same profile instead of creating a
   duplicate. A profile without an email is never sent.
2. **Purchases**: A completed payment arrives as a subscription start, a
   renewal, or a one-time purchase.
3. **Subscription changes**: Cancellations, reactivations, billing issues, and
   expirations are sent as they happen. This is what keeps a churned
   subscriber from reading as an active subscriber in Adapty Mail.
4. **Refunds**: A refund issued through FunnelFox arrives as a negative
   amount, so Adapty Mail subtracts it from revenue.

Here's what FunnelFox sends with each profile:

* Email
* Customer user ID
* Country
* Device, operating system, locale, and timezone
* Funnel ID
* Profile ID
* Session ID
* Experiment ID (if applicable)
* Email consent

Adapty Mail receives these within about a minute of the funnel event.

<Info>
  FunnelFox doesn't backfill. Forwarding starts when you save the secret key.
  Emails, purchases, and subscriptions from before that point are never sent, and
  there's no way to re-sync them.
</Info>

<Info>
  If you also use the [Adapty integration](/docs/integrations/subscription-management/adapty),
  the same purchase can reach Adapty Mail twice. Adapty Mail removes the
  duplicate, so your revenue isn't counted twice.
</Info>

## Setup

You need an active Adapty Mail project to complete this setup. Set up your
sending domain, campaign, and flow in Adapty Mail first, then connect
FunnelFox.

<Warning>
  Finish the Adapty Mail setup ([steps 1-5](/docs/integrations/email-providers/adapty-mail#1-set-up-your-brand-and-company)) before you paste your secret key into FunnelFox.
  FunnelFox starts forwarding the moment you save the key and never backfills, so
  profiles that arrive before your flow exists won't be picked up by it.
</Warning>

### 1. Set up your brand and company

1. Go to [Brand](https://mail.adapty.io/brand) in your Adapty Mail dashboard
   and check that your brand is set. If it isn't, drop in your App Store or
   Google Play link and Adapty Mail builds a brand profile from it.

<Frame>
  <img src="https://mintcdn.com/funnelfox/tqU_j3A9t_9KFvyV/assets/adapty-mail-brand.png?fit=max&auto=format&n=tqU_j3A9t_9KFvyV&q=85&s=07c4453ce2083491dde20c7056b76706" width="1920" height="989" data-path="assets/adapty-mail-brand.png" />
</Frame>

2. Go to **Settings > Company** from the top right and check that your company
   address is set.

<Frame>
  <img src="https://mintcdn.com/funnelfox/tqU_j3A9t_9KFvyV/assets/adapty-mail-address.png?fit=max&auto=format&n=tqU_j3A9t_9KFvyV&q=85&s=444725b77564735bdbf2d12bb3e792a8" width="1920" height="989" data-path="assets/adapty-mail-address.png" />
</Frame>

### 2. Add a sending domain

1. Go to **Settings > DNS** from the top right.

2. Fill out the **Email domains** section:

* **Domain**: Your root domain, for example `yourapp.com`. Only apex domains
  are accepted, so subdomains like `app.yourapp.com` are rejected at input.
* **Sending subdomain**: The prefix your emails go out from. Leave it empty to
  use `mail`, and your emails then come from an address like
  `hello@mail.yourapp.com`.

<Frame>
  <img src="https://mintcdn.com/funnelfox/tqU_j3A9t_9KFvyV/assets/adapty-mail-add-domain.png?fit=max&auto=format&n=tqU_j3A9t_9KFvyV&q=85&s=274a34a001f9568b5d872095dd1a24cf" width="1920" height="989" data-path="assets/adapty-mail-add-domain.png" />
</Frame>

3. Click **Add domain**.

4. In your domain registrar, add every DNS record the new domain card lists.
   They come in three groups: your sending subdomain's DKIM and MAIL FROM
   records, the records for the mailbox that warms the domain up, and the
   records for `go.yourapp.com`, which serves images and tracked links. To
   learn what each group does, go to
   [which records you add](https://adapty.io/docs/mail-sending-domain#which-records-you-add).

5. Add the suggested DMARC TXT record on your root domain.

6. Click **Check** to verify your domain, or leave the page and let Adapty Mail
   poll DNS for you.

<Frame>
  <img src="https://mintcdn.com/funnelfox/tqU_j3A9t_9KFvyV/assets/adapty-mail-check.png?fit=max&auto=format&n=tqU_j3A9t_9KFvyV&q=85&s=6cc018dbea6fb4c323847fbe759d67d6" width="1920" height="989" data-path="assets/adapty-mail-check.png" />
</Frame>

<Accordion title="Verification timing at a glance">
  * **Automatic polling**: The first check runs 1 minute after you add the
    domain. Intervals then double up to once per hour until the records are
    found.
  * **Manual check**: Click **Check** at any time to trigger an immediate check.
  * **DNS propagation**: Usually minutes, up to 48 hours in rare cases.
  * **Verification window**: 7 days. If it lapses, your DNS records stay in
    place, so add your domain again in **Settings > DNS** to start a new window.
</Accordion>

<Tip>
  One verified domain is enough to start sending, and a project can hold up to
  five. You don't have to wait for DNS to propagate before continuing: set up
  your web paywall, campaign, and flow in the meantime.
</Tip>

### 3. Create a web paywall

The web paywall is the funnel with checkout that users land on when they click
a call to action in your emails.

1. Go to **Web Paywalls** in your Adapty Mail dashboard.

2. Click **Create** at the top right and enter your web paywall details:

* **Name**: Your paywall title.
* **Paywall URL**: Select **Enter URL manually**.
* **URL**: Your [funnel URL](/docs/dashboard/funnels#funnel-list) with placeholders
  as query parameters, for example
  `https://demo-app.fnlfx.com/new-paywall?email={email}&adapty_profile_id={adapty.external_profile_id}`.

<Frame>
  <img src="https://mintcdn.com/funnelfox/tqU_j3A9t_9KFvyV/assets/adapty-mail-paywall.png?fit=max&auto=format&n=tqU_j3A9t_9KFvyV&q=85&s=ad96fa4d8afd7218d6e5b24a3c475d2b" width="1920" height="989" data-path="assets/adapty-mail-paywall.png" />
</Frame>

3. Click **Save**.

### 4. Create a campaign

1. Go to **Campaigns** in your Adapty Mail dashboard.

2. Click **Create** at the top right and enter your campaign details:

* **Name**: Your campaign title.
* **Web paywall**: Select the web paywall you created in the previous step.
* **Description**: Your optional campaign description.

3. Click **Generate emails**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/tqU_j3A9t_9KFvyV/assets/adapty-mail-generate.png?fit=max&auto=format&n=tqU_j3A9t_9KFvyV&q=85&s=5c89ace4eda58b64ae18b17df4f31bb3" width="1920" height="989" data-path="assets/adapty-mail-generate.png" />
</Frame>

4. Select how emails are generated:

* **Tone**: Options are generated specifically for your app's category. Your
  choice shapes subject lines, headlines, body copy, and calls to action across
  every email. It doesn't affect layout or hero images.
* **Language**: Pick the email language.
* **Custom prompt**: Optional free-form instructions, up to 2,000 characters.
  Add promo or audience details, must-have items, or extra tone direction the
  presets can't capture.
* **Number of emails**: By default, the AI picks the count based on best
  practices and your app context. Set the number manually if needed, between 1
  and 15 emails.

<Frame>
  <img src="https://mintcdn.com/funnelfox/tqU_j3A9t_9KFvyV/assets/adapty-mail-generate-2.png?fit=max&auto=format&n=tqU_j3A9t_9KFvyV&q=85&s=27262ef018559cd7bdbed63f4cd8cfd7" width="1920" height="989" data-path="assets/adapty-mail-generate-2.png" />
</Frame>

5. Click **Create**.

<Tip>
  Review the generated emails now, or come back to them once the rest of the
  integration is set up.
</Tip>

### 5. Create a flow

1. Go to [Flows](https://mail.adapty.io/flows/never-purchased) in your Adapty
   Mail dashboard.

2. Select your trigger. Each tab represents a user segment that starts your
   email campaign:

* **Never purchased**: Users who signed up but haven't made any purchase yet.
* **Renewal cancelled**: Users who turned off auto-renewal but still have an
  active subscription. This covers both paid subscribers and trial users who
  cancelled before conversion.
* **Billing issue**: Payment failed because of a declined or expired card, or
  the subscription is in a grace period after a missed renewal.
* **Expired**: Subscription lapsed and access is gone.
* **Refunded**: Users who requested a refund after purchase.

<Frame>
  <img src="https://mintcdn.com/funnelfox/tqU_j3A9t_9KFvyV/assets/adapty-mail-flows.png?fit=max&auto=format&n=tqU_j3A9t_9KFvyV&q=85&s=aa01c8a8c3fa284cc675f659176ebe3d" width="1920" height="989" data-path="assets/adapty-mail-flows.png" />
</Frame>

3. Click **Create** from the tab you want to configure.

<Frame>
  <img src="https://mintcdn.com/funnelfox/tqU_j3A9t_9KFvyV/assets/adapty-mail-create-flow.png?fit=max&auto=format&n=tqU_j3A9t_9KFvyV&q=85&s=670cc1dfb573c4442c36f3c200ef3635" width="1920" height="989" data-path="assets/adapty-mail-create-flow.png" />
</Frame>

4. Select how you create your flow:

* **Segment**: Select **All Users** to target everyone who hits this trigger,
  or create a new segment based on profile attributes.
* **Content type**: Keep the default **Campaign**.
* **Campaign**: Select the campaign you just created.

<Frame>
  <img src="https://mintcdn.com/funnelfox/tqU_j3A9t_9KFvyV/assets/adapty-mail-flow-save.png?fit=max&auto=format&n=tqU_j3A9t_9KFvyV&q=85&s=a03349b087f08c9af2f49a1d078ad240" width="1920" height="989" data-path="assets/adapty-mail-flow-save.png" />
</Frame>

5. Click **Save**.

<Warning>
  FunnelFox forwards a profile whether or not the user ticked the marketing
  consent checkbox in your funnel. The answer travels as the `email_consent`
  attribute, so **All Users** includes leads who didn't consent. Build your
  segment on `email_consent` if you need to honor it.
</Warning>

<Warning>
  Two triggers depend on events FunnelFox can't always send:

  * **Never purchased**: A \$0 Stripe intro offer sends no purchase event, so a
    user who starts a free trial stays "never purchased" until their first real
    charge.
  * **Refunded**: Only refunds issued through FunnelFox are forwarded. A refund
    you make directly in the <Tooltip tip="Payment Service Provider">PSP</Tooltip>
    dashboard never reaches Adapty Mail, so campaigns keep treating that user as
    a customer.
</Warning>

### 6. Connect to FunnelFox

1. Go to **Settings > Project** in your Adapty Mail dashboard.

2. Copy the **Secret key**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/tqU_j3A9t_9KFvyV/assets/adapty-mail-copy.png?fit=max&auto=format&n=tqU_j3A9t_9KFvyV&q=85&s=b2e04a2af2d7def931131cc728227d6e" width="1920" height="989" data-path="assets/adapty-mail-copy.png" />
</Frame>

3. Go to [Integrations > Adapty Mail](https://app.funnelfox.com/integrations/adapty_mail)
   in FunnelFox.

4. Paste your key into **Secret key** and click **Save changes**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/tqU_j3A9t_9KFvyV/assets/adapty-mail-paste.png?fit=max&auto=format&n=tqU_j3A9t_9KFvyV&q=85&s=33d9de9cf53fd23a0eb9a3f106f29a53" width="1920" height="989" data-path="assets/adapty-mail-paste.png" />
</Frame>

Your setup is complete. Emails collected in your funnels now flow into your Adapty Mail campaigns.

<Tip>
  Preview and test funnel traffic is forwarded as real profiles. Use a throwaway
  address or a separate Adapty Mail project when you test.
</Tip>
