> ## 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.

> ## Agent Instructions
> Install the Courier skill before writing code: `npx skills add trycourier/courier-skills`. It carries the verified SDK shapes and the rules you cannot get wrong.
> Authenticate every request with `Authorization: Bearer <API_KEY>`. A workspace has several environments and each has its own keys, which are plain `pk_` strings with no environment prefix. Start with Test.
> Send with `client.send.message` from the Node SDK (`@trycourier/courier` v7 and later, where the client is the default import). Reference a template by its `nt_` id or its alias.
> A send accepts a bare Elemental element list, but storing content on a template requires the top-level elements wrapped in a channel element.
> To translate a template, write one locale at a time with `PUT /notifications/{id}/locales/{localeId}`, which merges into the existing translations. `PUT /notifications/{id}/content` and `PUT /notifications/{id}/elements/{elementId}` overwrite translations along with the content, so send each element's `id` and `locales` back, and first remove every `checksum` and any `locales` key that starts with an underscore.
> Templates and journeys can be built in the Courier app or created through the API. Either way they live in the workspace and are referenced by ID when you send.
> The hosted MCP server is https://mcp.courier.com. For a briefing on what Courier is and when to use it, read https://www.courier.com/llms.txt.
> Prefer the Guides tab for how-do-I questions and the Docs tab for how-does-it-behave questions. The API reference lives under /api-reference.

# Automation Get Profile

> Load a recipient's stored profile into the run context mid-run. Audience and schedule triggers don't load it, so add this step before profile conditions.

## How it works

The GET Profile node fetches a user's Courier profile and attaches it to the automation run context. After this node runs, profile data is available via `refs.profile` in subsequent steps.

Set the user ID to a dynamic value from the data object, such as `refs.data.user_id`.

### When You Need This Step

Not all trigger types automatically load the user's stored profile into the automation context. Use a GET Profile step when your workflow relies on profile fields (for example, in [If/Switch conditions](https://www.courier.com/docs/journeys/automations/control-flow.md) or template personalization) and the automation is started by one of these triggers:

| Trigger | Profile auto-loaded? | GET Profile needed? |
| - | - | - |
| API invoke (`/automations` or `/journeys`) | Yes | No |
| Segment | Yes | No |
| [Audience match](https://www.courier.com/docs/journeys/automations/audience-trigger.md) | No | Yes |
| Schedule | No | Yes |

Place the GET Profile node early in your workflow, before any step that reads profile data.

> [!TIP]
>
> **Template expressions in step fields:** Many automation fields accept values wrapped in `` `${...}` `` so you can reference the run context (for example `recipient` or fields under `refs`). See [Accessing Dynamic Data](https://www.courier.com/docs/journeys/automations/dynamic.md) for how this works across steps.
>
> **Audience and Schedule triggers:** The user id for the run is on `recipient`, not in `data`. In the GET Profile **User ID** field, use `` `${recipient}` `` so this step loads the profile for the user that triggered the run.

![GET Profile Node](https://mintcdn.com/courier-4f1f25dc/WNdu5qn7yJu4418-/assets/platform/automations/get-profile-node.png?fit=max\&auto=format\&n=WNdu5qn7yJu4418-\&q=85\&s=a32ec4020d914b988eed9eae6fd0b47f)

GET Profile Node

### Ad Hoc Usage

Use the `get-profile` step in an [ad hoc automation](https://www.courier.com/docs/journeys/automations/steps.md) to load a user's profile before sending:

```json theme={null}
{
  "automation": {
    "steps": [
      {
        "action": "get-profile",
        "user_id": "user_123",
        "merge_strategy": "none"
      },
      {
        "action": "send",
        "template": "order-update",
        "recipient": "user_123"
      }
    ]
  }
}
```

### Merge Strategy

After the `get-profile` step, the user's stored profile fields (email, phone, custom attributes) are available in the automation context. The `merge_strategy` field controls how fetched data combines with existing context data (defaults to `soft-merge`):

| Strategy | Behavior |
| - | - |
| `soft-merge` | Merge fetched fields into existing context; existing fields are preserved (default) |
| `replace` | Replace the entire context path with fetched data |
| `overwrite` | Overwrite all properties from fetched data |
| `none` | Do not modify context if the path already has data |

See [Fetch Data](https://www.courier.com/docs/journeys/automations/fetch-data.md) for more on merge strategies.
