MailerLite

Add a bot to MailerLite using the official integration.

The official MailerLite integration allows your bot to create, update, fetch, or delete your MailerLite subscribers.

Setup

Install the integration in Botpress

First, install the integration to your bot:

  1. In Botpress Studio, select Explore Hub in the upper-right corner.
  2. Search for the MailerLite integration, then select Install Integration.

In the Configuration menu, you should see one field: API Key. Leave it empty for now—you’ll come back to it after creating your MailerLite API key.

Create a MailerLite developer API key

Next, create a MailerLite API key:

  1. Log in to your MailerLite account.
  2. Select Integrations from the left navigation bar.
  3. To the right of API, select Use.
  4. Select Generate new token. Enter a name, then select Create token.
  5. Copy the API token.

Configure the integration in Botpress

Now, you can finish setting up the integration in Botpress:

  1. In the integration’s API Key field, paste your MailerLite developer API key.
  2. Select Save Configuration.

Cards

Delete Subscriber

Delete existing subscriber by subscriber id

inputobject
outputobject

Fetch Subscriber

Search subscriber by id or by email

inputobject
outputobject

Upsert Subscriber

Create or update existing subscriber with given fields, identified by their email or id

inputobject
outputobject

Triggers

Subscriber Created

A new subscriber has been created in MailerLite

payloadobject

Troubleshooting

If you run into errors when using the integration’s Cards, check out your bot’s Logs and locate the error message:

An unexpected error occurred

Your developer API token may have been revoked. Create a new one and update your bot’s configuration.

Invalid JSON

If you’re passing data into the Upsert Subscriber Card’s customFields parameter, make sure it’s a valid JSON string of key-value pairs..