Skip to content

MailerLite Automations

How to Remove a Subscriber From a MailerLite Group When a WooCommerce Order Is Refunded

Some groups are only for paying customers — onboarding, product tips, a members-only newsletter. When an order is refunded, the person should come out of them. Zapify does this with the An order changes status trigger set to Refunded and the Remove a subscriber from a group action. MailerLite is a Zapify PRO integration.

What this automation does

The automation is one trigger plus one action:

  • Trigger: An order changes status (WC_ORDER_STATUS_CHANGED, WooCommerce)
  • Action: Remove a subscriber from a group (MAILERLITE_REMOVE_FROM_GROUP, MailerLite)

When an order changes to Refunded, Zapify removes the customer from the MailerLite group you choose. They stay in MailerLite as a subscriber; only the group changes.

Before you start

  • WooCommerce installed and active.
  • A MailerLite account (the current MailerLite, not MailerLite Classic).
  • A MailerLite API key — create one in MailerLite under Integrations → API. MailerLite's own page for it is here.
  • The MailerLite group customers were added to. The customer must already be a subscriber.

PRO feature

MailerLite is a Zapify PRO integration and needs a Connection under Settings → Connections. The An order changes status trigger used here is free.

How to build the automation

Step 1: Connect MailerLite

  1. Go to Settings → Connections and click Add New.

Open the Connections tab

  1. Choose MailerLite, paste in your API key, and name the connection something like Newsletter MailerLite.

Add the MailerLite connection

  1. Click Test. Zapify asks MailerLite to accept the key and answers MailerLite accepted the credentials. If the key is wrong it says MailerLite refused the credentials. instead, so you find out before building anything.
  2. Save.

See Connections for how this screen works generally.

Step 2: Create a new automation

  1. In the WordPress admin, go to Zapify → Automations.
  2. Click Add New to open the builder.
  3. Name it clearly, such as Remove refunded customers from the customers group.

Create a new automation

Step 3: Add the "An order changes status" trigger

  1. Click Add Trigger.

Add a trigger

  1. Choose WooCommerce as the app.

Select WooCommerce as the trigger

  1. Select An order changes status.

Select An order changes status

  1. Set New status to Refunded. Leave Previous status as Any unless the transition matters.

Step 4: Add the "Remove a subscriber from a group" action

  1. Click Add Action.

Add an action

  1. Choose MailerLite as the app.

Select MailerLite as the action

  1. Select Remove a subscriber from a group.

Select Remove a subscriber from a group

Step 5: Configure the action

Field Required What it does
Connection Yes The MailerLite connection from Step 1.
Email address Yes Insert the Billing email token.
Group Yes The group to take them out of.

Step 6: Set the steps Live and save

Each trigger and action has its own Live / Off / Draft switch. A new automation starts as a Draft and does nothing until its steps are Live.

  1. Set the trigger and every action to Live.
  2. Click Save.

Set the automation live

Step 7: Test it

Refund a test order for a customer who is in the group. Check the group in MailerLite, or Zapify → Logs, which shows … was removed from the group.

Tokens you can use

Token What it holds
Billing email The customer's email address.
Order number / Order total / Previous status / New status Details of the order and the change.

The action makes one token available to later actions: Subscriber ID.

Conclusion

With the An order changes status trigger and the Remove a subscriber from a group action, a refund tidies your MailerLite groups without anybody doing it by hand. To keep another CRM in step too, see removing a Groundhogg tag when an order is refunded.

FAQs

Is this free in Zapify?

The trigger is free. The MailerLite actions need an active Zapify PRO licence and a Connection.

Does this delete the subscriber?

No. It only removes them from the group. To delete a subscriber entirely, use Delete a subscriber.

What if the address is not a subscriber?

The run fails and says the address is not a subscriber in this MailerLite account, so you know to check it.

Does a partial refund count?

This trigger reacts to the order's status. A partial refund usually leaves the order as it was, so it will not fire. Check how your store records refunds.

Why is my new group or custom field not in the dropdown?

Zapify keeps the groups and fields it reads from MailerLite for a minute, so the builder does not call MailerLite on every dropdown. Wait a moment and reopen the field. If the dropdown stays empty, use Test on the connection, because an unreachable MailerLite gives an empty list.

Does this work with MailerLite Classic?

No. Zapify uses MailerLite's current API, and the older Classic API is not supported. Create the API key in the current MailerLite under Integrations → API.

Do I need to write any code?

No. The API key is the only thing you copy from outside Zapify.

Was this page helpful?