MailerLite setup
Connect your MailerLite account so buyers land in the right MailerLite group. When someone pays, a sequence can find or create them as a subscriber, add them to a group and update their fields. A new MailerLite subscriber can also start a Plandalf sequence.
Groups are the usual hand-off: a MailerLite automation that starts when someone joins a group takes it from there.
Before you start
- A MailerLite account on the current MailerLite. MailerLite Classic accounts use a different API and won’t connect.
- The groups and custom fields you plan to use, already set up in MailerLite.
Get your MailerLite API token
-
In MailerLite, open Integrations in the left sidebar. Find MailerLite API and click Use.
-
Under API tokens, click Generate new token. Name it “Plandalf”. Leave All IPs allowed selected, accept the terms and click Create token.
-
MailerLite shows the token only once. Copy it now. If you lose it, generate a new one.
The token works with the permissions of the MailerLite user who created it, and stops working if that user is removed from the account.
Connect MailerLite to Plandalf
-
Find MailerLite in the Marketplace
In Plandalf, open Automation in the sidebar and choose the Marketplace tab. Find MailerLite under Available now and click Connect.
-
In the Connect MailerLite window, keep or change the Integration name, paste the token into API Key, then click Connect.
-
Plandalf checks the token with MailerLite straight away. When you see MailerLite connected, choose Build an automation or Not now.
Steps you can add
The group and field steps work on a subscriber ID, so start with Find or Create Subscriber and pass its subscriber_id along.
Find or Create Subscriber
Creates the subscriber, or updates them if MailerLite already has that email.
- Email Address (required), usually
{{trigger.customer_email}}. - Name: the full name, for example
{{trigger.customer_name}}. To keep first and last names separate, set it to{{trigger.customer_first_name}}instead and fill in Last Name. - Last Name: optional, usually
{{trigger.customer_last_name}}when you split the name.
The step returns the subscriber’s subscriber_id and status.
Add Subscriber to Group
Adds a subscriber to a group.
- Subscriber ID (required): pick
subscriber_idfrom the Find or Create Subscriber step in the variable menu. Don’t put the email address here. - Group (required): pick a group from your account.
Update Subscriber Fields
Updates fields on an existing subscriber.
- Subscriber ID (required).
- Fields (required): pairs of a MailerLite field key and a value, for example
companyorlast_name. Create custom fields in MailerLite first and use their keys.
Start a sequence from MailerLite
The Subscriber Created trigger starts a sequence when a new subscriber is added in MailerLite. Pick a Group to fire only for subscribers in that group, or leave it blank for any new subscriber.
There’s nothing to set up in MailerLite. When you save the trigger, Plandalf adds the webhook to your MailerLite account through its API, and the trigger’s 2. Config tab shows Connected to MailerLite. Deleting the trigger removes the webhook again.
The trigger gives later steps the subscriber’s subscriber_id, email, status, name, last_name, fields and groups.
Example: add buyers to a Customers group
-
Go to Automation → My Sequences and create a sequence called “Buyers to MailerLite”.
-
Choose Plandalf and Checkout Completed. Under Offer, pick your checkout. On 3. Test, pick a recent checkout as the sample record.
-
Click Add a step, choose MailerLite and Find or Create Subscriber, and pick your MailerLite account. Set Email Address to
{{trigger.customer_email}}and Name to{{trigger.customer_name}}. Run its test so the next step can use its output. -
Add a second step: MailerLite, Add Subscriber to Group. For Subscriber ID, pick
subscriber_idfrom the previous step. Choose your Customers Group. -
Testing changes a real subscriber, so use your own email. If the group starts a MailerLite automation, check that automation is ready too. Then turn the sequence On.
To try it with a test card, switch on Run on test purchases in the sequence’s Settings first. Test purchases skip automations by default.
There is no step to remove someone from a group, and Plandalf has no refund trigger yet. Handle refunds in MailerLite.
Common errors
| What you see | What to do |
|---|---|
| Authentication failed when connecting | Check the token came from Integrations → MailerLite API and that your account isn’t on MailerLite Classic. If you set an IP allowlist on the token, allow all IPs. Plandalf keeps the failed connection in My apps. Open it there, paste a new token and choose Test Connection, rather than connecting again. |
| “Subscriber ID is required” | Pick subscriber_id from the Find or Create Subscriber step, and make sure that step runs first. |
| “Failed to assign subscriber to group” | The Subscriber ID is empty or an email, or the group was deleted. Fix the mapping or pick the group again. |
| “At least one field must be provided” | Update Subscriber Fields needs at least one field and value. |
| A field doesn’t change in MailerLite | The key doesn’t match a MailerLite field. Check the field’s key in MailerLite and use it exactly. |
| “MailerLite didn’t accept the webhook” on the trigger | MailerLite’s reason is shown underneath. Fix it, usually an expired token, then click Try again. |