> ## 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`, the default import of the v7 Node SDK. 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.
> 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 mid-run and branch on what it holds.

## 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](/docs/journeys/automations/control-flow) 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](/docs/journeys/automations/audience-trigger) | 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](/docs/journeys/automations/dynamic) 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.
</Tip>

<Frame caption="GET Profile Node">
  <img src="https://mintcdn.com/courier-4f1f25dc/WNdu5qn7yJu4418-/assets/platform/automations/get-profile-node.png?fit=max&auto=format&n=WNdu5qn7yJu4418-&q=85&s=a32ec4020d914b988eed9eae6fd0b47f" alt="GET Profile Node" width="1894" height="858" data-path="assets/platform/automations/get-profile-node.png" />
</Frame>

### Ad Hoc Usage

Use the `get-profile` step in an [ad hoc automation](/docs/journeys/automations/steps) 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](/docs/journeys/automations/fetch-data) for more on merge strategies.
