> Connect MailerLite to add buyers to groups, remove them on refund, update subscriber fields, and start a sequence when a subscriber is created.

Source: https://plandalf.com/docs/automations/mailerlite

Automations

# MailerLite

Connect MailerLite so a sequence can add buyers to a group, which can start a MailerLite automation, and take them out again on refund. A new MailerLite subscriber can start a Plandalf sequence too.

**Before you start**

You need the current MailerLite. MailerLite Classic accounts use a different API and won't connect. Create your groups and custom fields in MailerLite first.

## Get a MailerLite API token

1.  ### Open the API page
    
    In MailerLite, open **Integrations**, find **MailerLite API** and click **Use**. The **Get your MailerLite API key** link in Plandalf's connect window opens the same page.
    
2.  ### Generate a token
    
    Click **Generate new token**, name it "Plandalf" and create it. MailerLite shows the token once, so copy it now.
    

## Connect MailerLite

In Plandalf, open **Automations → Marketplace** and click **Connect** on MailerLite. Paste the token into **API Key** and click **Connect**.

## Steps you can add

Step

What it does

Fields

**Find or Create Subscriber**

Finds a subscriber by email or creates one.

Email Address (required), Name, Last Name

**Add Subscriber to Group**

Adds a subscriber to a group, by subscriber ID or email.

Subscriber ID or email, Group (both required), Add them to MailerLite if they're new

**Remove Subscriber from Group**

Removes them from a group, for example on refund. Skipped when the email isn't in MailerLite.

Email Address, Group (both required)

**Update Subscriber Fields**

Updates fields such as `name`, `last_name` or `company`.

Subscriber ID, Fields (both required)

**Add them to MailerLite if they're new** is off by default, so an email that isn't on your list is skipped. Turn it on to add new people as subscribers. They count toward your MailerLite plan and get broadcasts sent to all subscribers, so only do this if you have their consent.

To split names in MailerLite, set **Name** to `{{trigger.customer_first_name}}` and **Last Name** to `{{trigger.customer_last_name}}`.

## Start a sequence from MailerLite

**Subscriber Created** runs when a new subscriber is created. Pick a **Group** to run only for subscribers in it, or leave it blank. MailerLite has no screen for webhooks, so Plandalf adds the webhook for you when you save the trigger, and checks MailerLite's signature on every delivery.

## Example: add buyers to a customers group

1.  ### Set the trigger
    
    Create a sequence with **Plandalf → Checkout Completed** and pick your checkout.
    
2.  ### Create the subscriber
    
    Add **MailerLite → Find or Create Subscriber** with **Email Address** `{{trigger.customer_email}}` and **Name** `{{trigger.customer_name}}`.
    
3.  ### Add them to the group
    
    Add **MailerLite → Add Subscriber to Group** with `{{trigger.customer_email}}` and your customers group. Test with your own email, then turn the sequence on.
    

To remove buyers from the group on refund, use the [Remove access on refund](https://plandalf.com/docs/automations/templates#remove-access-on-refund) template.

Something wrong or missing? Email [hello@plandalf.com](mailto:hello@plandalf.com).
