Skip to content

MailerLite Automations

How to Delete a MailerLite Subscriber When a Gravity Forms Form Is Submitted

Privacy rules such as GDPR can oblige you to erase somebody on request. Zapify can remove them from MailerLite as soon as they submit your erasure form, with the free A form is submitted trigger and the Delete a subscriber action. MailerLite is a Zapify PRO integration.

What this automation does

The automation is one trigger plus one action:

  • Trigger: A form is submitted (GRAVITYFORMS_FORM_SUBMITTED, Gravity Forms)
  • Action: Delete a subscriber (MAILERLITE_DELETE_SUBSCRIBER, MailerLite)

When the form is submitted, Zapify deletes the subscriber with that address from MailerLite. This is not an unsubscribe: the record and its history go.

Before you start

  • Gravity Forms installed and active, with a published erasure request form that has an email field.
  • 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.

PRO feature

MailerLite is a Zapify PRO integration and needs a Connection under Settings → Connections. The A form is submitted trigger used here is free.

Deleting cannot be undone

The subscriber is removed from MailerLite for good. Anybody can type any address into a public form, so use this on a form only logged-in users can reach, or add a confirmation step first. See Filters and conditions.

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 Delete subscribers on erasure request.

Create a new automation

Step 3: Add the "A form is submitted" trigger

  1. Click Add Trigger.

Add a trigger

  1. Choose Gravity Forms as the app.

Select Gravity Forms as the trigger

  1. Select A form is submitted.

Select A form is submitted

  1. In the Form field, pick your erasure request form. Choosing a form gives you a token for each of its fields.

Step 4: Add the "Delete a subscriber" action

  1. Click Add Action.

Add an action

  1. Choose MailerLite as the app.

Select MailerLite as the action

  1. Select Delete a subscriber.

Select Delete a subscriber

Step 5: Configure the action

Field Required What it does
Connection Yes The MailerLite connection from Step 1.
Email address Yes Insert the token for the form's email field. This is the subscriber that will be deleted.

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

Create a throwaway subscriber in MailerLite, submit the form with its address, and check that it is gone. Zapify → Logs shows … was deleted from MailerLite. If there is no such subscriber, the run is skipped and says … is not a subscriber, so there was nothing to delete.

Tokens you can use

Token What it holds
Form title / Entry ID / Submitted at Which entry asked for the deletion, for your records.
One token per form field Appear once you choose the form.

The action makes one token available to later actions: Subscriber ID, the ID of the subscriber that was deleted.

Conclusion

With the A form is submitted trigger and the Delete a subscriber action, an erasure request reaches MailerLite without anybody having to log in. For a gentler option that keeps the record, see unsubscribing from a form.

FAQs

Is this free in Zapify?

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

What if they are not in MailerLite?

The run is skipped rather than failed, because the result you wanted — that address not being in MailerLite — already holds.

Does this erase them from WordPress too?

No. It only removes the MailerLite subscriber. WordPress has its own tools for erasing a user's data.

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?