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

# Audience Trigger for Automations

> Trigger an Automation run for each user entering or leaving a dynamic audience. Add a GET Profile step to load fields before personalized sends.

## Overview

The Audience trigger starts an automation run for each user who enters or leaves a [dynamic audience](/platform/users/audiences). When a user's profile changes and they newly satisfy (or no longer satisfy) the audience rules, Courier fires an individual automation run for that user.

This is useful for workflows that react to profile changes, such as:

* Sending a welcome sequence when a user upgrades to a premium tier
* Triggering a win-back flow when a user becomes inactive
* Notifying an account manager when a high-value customer changes status

## Configuration

<Frame caption="Audience trigger configuration">
  <img src="https://mintcdn.com/courier-4f1f25dc/vtbfWgZJXtOFtHNn/assets/platform/automations/audience-trigger.png?fit=max&auto=format&n=vtbfWgZJXtOFtHNn&q=85&s=12585f2a26475b1ee85529f55da1c036" alt="Audience trigger configuration showing Source, Type, and Audience fields" width="1300" height="836" data-path="assets/platform/automations/audience-trigger.png" />
</Frame>

1. Open the Automation Designer and select **Audience** as the trigger source.
2. Choose the event type:
   * **Match** fires when a user enters the audience.
   * **Unmatch** fires when a user leaves the audience.
3. Choose your audience from the dropdown.

Each time the event fires, Courier creates a separate automation run for that user.

## Run Context

When an audience trigger fires, the automation run context contains **only the user's ID** as the recipient. Stored profile fields (email, phone, custom attributes) and data are **not** automatically loaded.

| Context field | Value                                 |
| ------------- | ------------------------------------- |
| `recipient`   | The user ID that matched or unmatched |
| `profile`     | Empty                                 |
| `data`        | Empty                                 |

This differs from API-invoked and Segment-triggered automations, which pre-load profile data before the first step runs.

### Loading Profile Data

If your workflow uses profile fields (for example, in [If/Switch conditions](/platform/automations/control-flow) or template personalization), add a [GET Profile](/platform/automations/get-profile) step early in your workflow, before any step that reads profile data. The GET Profile step fetches the user's stored Courier profile and merges it into the run context.

<div style={{ display: "flex", justifyContent: "center", margin: "32px 0" }}>
  **Audience Trigger** → **[GET Profile](/platform/automations/get-profile)** → **[If/Switch](/platform/automations/control-flow)** (profile condition) → **Send**
</div>

Without the GET Profile step, profile-based conditions will evaluate against an empty object and always fall through to the default branch.

## Audience Membership Timing

Audience triggers depend on Courier's [pre-computed membership model](/platform/users/audiences#how-audience-membership-works). A trigger fires when membership changes, not on a fixed schedule. Keep in mind:

* **Profile updates drive membership.** A trigger fires only when a profile change causes a user to enter or leave the audience.
* **Rule changes trigger rebuilds.** If you update an audience's filter rules, Courier rebuilds the membership list. This can take several minutes for large audiences, and triggers may fire as members are re-evaluated.
* **Each match is a separate run.** If you update audience rules and many users match at once, each user gets their own automation run.

## Related Resources

<CardGroup cols={2}>
  <Card title="Lists & Audiences" href="/platform/users/audiences" icon="users">
    Audience rules, operators, and membership model
  </Card>

  <Card title="GET Profile" href="/platform/automations/get-profile" icon="user">
    Load profile data into the automation context
  </Card>

  <Card title="If / Switch" href="/platform/automations/control-flow" icon="code-branch">
    Conditional logic using profile, data, and step refs
  </Card>

  <Card title="Scheduling" href="/platform/automations/scheduling" icon="clock">
    Time-based triggers and cron expressions
  </Card>
</CardGroup>
