Skip to content

MailerLite Automations

How to Add a Logged-In User to a MailerLite Group When They Click a Button

A member who is already logged in should not have to type their email again to hear from you. With a Keep me updated button on your site, Zapify adds them to a MailerLite group in one click, using the A user clicks a button trigger and the Add a subscriber to a group action. Buttons and MailerLite are both Zapify PRO.

What this automation does

The automation is one trigger plus one action:

  • Trigger: A user clicks a button (BUTTON_CLICKED, Buttons)
  • Action: Add a subscriber to a group (MAILERLITE_ADD_TO_GROUP, MailerLite)

When a logged-in user clicks the button, Zapify adds their account email to the MailerLite group you choose.

Before you start

  • Members who log in to your site.
  • 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.
  • A group in MailerLite for people who ask for updates.

PRO feature

MailerLite is a Zapify PRO integration and needs a Connection under Settings → Connections. The A user clicks a button trigger needs Zapify PRO as well.

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 Let members join product updates.

Create a new automation

Step 3: Add the "A user clicks a button" trigger

  1. Click Add Trigger.

Add a trigger

  1. Choose Buttons as the app and select A user clicks a button.

Select Button -> A user clicks a button

  1. Give the trigger a key, such as join-updates. The key is what ties the button on your page to this automation.

Step 4: Add the "Add a subscriber to a group" action

  1. Click Add Action.

Add an action

  1. Choose MailerLite as the app.

Select MailerLite as the action

  1. Select Add a subscriber to a group.

Select Add a subscriber to 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 trigger's Their email address token.
Group Yes The group they are joining, such as Product updates.
Create if missing No On by default.

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

Log in as a test user and click the button. Check the group in MailerLite, or open Zapify → Logs to confirm the run.

Add this shortcode to any page, post or widget. The key must match the key on the trigger:

[zapify_button key="join-updates" label="Keep me updated"]

See Buttons for every shortcode option and the inline link version.

Tokens you can use

Token What it holds
Who clicked / Their username / Their display name The user who clicked.
Their email address The address to use in the action.
Page it was clicked from The page the button was on.

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

Conclusion

With the A user clicks a button trigger and the Add a subscriber to a group action, joining a list is one click for anyone logged in. For the same idea with a CRM tag, see adding a Groundhogg tag when a user clicks a button.

FAQs

Is this free in Zapify?

No. The A user clicks a button trigger and the MailerLite actions both need an active Zapify PRO licence, and MailerLite needs a Connection.

Does it work for visitors who are not logged in?

The button knows who clicked only when they are logged in. For anonymous visitors, use a signup form instead — see adding a Contact Form 7 subscriber.

Can someone click it twice?

Yes, and it is safe: adding somebody to a group they are already in changes nothing.

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?