# Klaviyo

> Connect your Klaviyo account to manage profiles, list subscriptions, and track marketing events.

App · Email Marketing · 5 actions. Web page: https://docs.lodol.com/docs/integrations/klaviyo

## Actions

### Create profile

Create a new Klaviyo profile, or return the existing profile's ID if the email is already in use.

**Inputs**

- Email (`email`, text, required): Email address for the profile.
- First name (`first_name`, text): First name of the profile.
- Last name (`last_name`, text): Last name of the profile.
- Phone number (`phone_number`, text): Phone number in E.164 format, e.g. +15555550100.

**Outputs**

- `id` (text): ID of the profile (new or already existing).

**Example output**

```json
{
  "id": "01HABCDEF1234567890ABCDEF"
}
```

### Get profile

Look up a Klaviyo profile by email address.

**Inputs**

- Email (`email`, text, required): Email address of the profile to look up.

**Outputs**

- `profile` (object): The matching profile, or null if no profile has that email

**Example output**

```json
{
  "profile": {
    "email": "jane@example.com",
    "first_name": "Jane",
    "id": "01HABCDEF1234567890ABCDEF",
    "last_name": "Doe",
    "phone_number": "+15555550100"
  }
}
```

### List lists

List the lists in your Klaviyo account.

**Inputs**: None.

**Outputs**

- `lists` (list): List of lists in the account

**Example output**

```json
{
  "lists": [
    {
      "id": "Y6nRLr",
      "name": "Newsletter"
    }
  ]
}
```

### Subscribe profile to list

Add a profile (creating it if needed) to a Klaviyo list.

**Inputs**

- Email (`email`, text, required): Email address of the profile to subscribe.
- List ID (`list_id`, text, required): ID of the list to add the profile to.

**Outputs**

- `list_id` (text): ID of the list the profile was added to
- `profile_id` (text): ID of the subscribed profile

**Example output**

```json
{
  "list_id": "Y6nRLr",
  "profile_id": "01HABCDEF1234567890ABCDEF"
}
```

### Track event

Log a custom event (e.g. 'Placed Order') for a profile, for use in Klaviyo flows and segments.

**Inputs**

- Email (`email`, text, required): Email address of the profile the event belongs to.
- Metric name (`metric_name`, text, required): Name of the event/metric, for example 'Placed Order'.
- Properties (`properties`, object): Custom properties to attach to the event.
- Value (`value`, number): Optional numeric value for the event, for example an order total.

**Outputs**: None.

**Example output**

```json
{}
```
