Guides
Add a Subscriber to MailerLite
Steps to Add a Subscriber to MailerLite
1. Collect the User’s Email
- Add a step to your workflow that collects the user’s email.
- Store the collected email in a variable named, for example,
{{user.email}}
.
2. Add a Webhook Step
- Insert a Webhook step after the email is collected.
3. Configure the Webhook Step
Set up the Webhook step with the following information:
Webhook Configuration:
- Method:
POST
- URL:
https://connect.mailerlite.com/api/subscribers
- Headers: Add the following headers:
Content-Type
:application/json
Authorization
:Bearer YOUR_TOKEN
(replaceYOUR_TOKEN
with your MailerLite API key)
- Body: Configure the body as JSON with the email variable and any additional fields you want to include.
Example Setup:
Note: You can find your API key in the MailerLite API settings.
4. Preview in Iframe
Ensure that the workflow is set up correctly, and test it using an iframe preview.
Iframe Example:
To preview, integrate an iframe in your testing environment. Example configuration:
5. Additional Fields
For more information on what fields you can add, refer to the MailerLite documentation: List All Fields.
Validation and Testing
Before deployment, verify the following:
- Ensure the email collection step saves the email correctly into the
{{user.email}}
variable. - Validate that the Webhook request sends data accurately to MailerLite.
- Test the iframe preview to confirm it displays as expected.
Tip: Use JSONLint to validate your JSON structure.