# MailerLite

{% hint style="info" %}
For the older MailerLite version, please refer to [this guide](https://softr.gitbook.io/softr-documentation/integrations/mailerlite/mailerlite).
{% endhint %}

### How to integrate MailerLite with Softr

MailerLite integration can be applied to any block with email capture (CTA, Hero section, Form etc). For instance, if you are configuring a [CTA with email capture](https://softr.gitbook.io/softr-documentation/building-blocks/cta/call-to-action-with-email-capture), you will see an "Add to Mailerlite" option under the submit button's **Action.**

![Add to Mailerlite action](https://3426011356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0NiyhsmXAcV5u1c6XK%2Fuploads%2FDQFRG8C6XIgwDTa37ZhN%2Fadd-to-mailerlite-b.png?alt=media\&token=6cfd5229-8da6-4ee6-9ea6-09624b1dca29)

As soon as you choose this option, a new field will appear, where you need to provide the MailerLite **Action URL** to link the email capture form to your MailerLite account.

![Action URL field](https://3426011356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0NiyhsmXAcV5u1c6XK%2Fuploads%2FMCNwRVSOkFPUNGBRbCRv%2Fmailerlite-action-url-b.png?alt=media\&token=e225de4e-865c-49e9-83e0-8a87ec8304a2)

So, let's see how you can get the **Action URL** from MailerLite.

### How to locate MailerLite Action URL

#### **Step 1: Create a Subscribers Group**

Log into your MailerLite account, go to **Subscribers => Groups**, and create a group (or use an existing group if you already have one).

![Creating a group](https://3426011356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0NiyhsmXAcV5u1c6XK%2Fuploads%2FN4oPcCLx1bM6y0I8ai23%2Fcreate-group-b.png?alt=media\&token=cfd56553-cb68-4d57-a2ab-81502207f9f1)

**Step 2: Create an embedded form**

Then go to **Forms => Embedded Forms** and create an embedded form as shown below.

![Creating an embedded form](https://3426011356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0NiyhsmXAcV5u1c6XK%2Fuploads%2FaPGFb36QBLl6wfR4UC04%2Fcreate-embedded-form-b.png?alt=media\&token=d8727fa1-421c-461f-b747-dcbcd22a3db8)

#### Step 3:  Select a Subscribers Group for the Form

After entering a name, you'll see the next step, where you need to select the Subscribers group for the form. Choose the group where you want the contacts to be stored and hit C**ontinue**.

![Selecting a Subscribers Group](https://3426011356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0NiyhsmXAcV5u1c6XK%2Fuploads%2Fhaz8fs1xZLbrTrapymHS%2Fselect-group-b.png?alt=media\&token=f72f8f3d-d18f-43cd-a3b6-66e7b606da66)

In the next screen, just hit **Done Editing** to finalize the form.

![](https://3426011356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0NiyhsmXAcV5u1c6XK%2Fuploads%2FYgS8fCJkVeq73VC0mqol%2Fdone-editing-b.png?alt=media\&token=de551aeb-092a-4c1f-96b4-9b08a3823634)

#### Step 4: Getting the Action URL of the Form

Finally, you'll be taken to your form's **Overview** page, where you should scroll down to the **Embed form into your website** section and switch to the **HTML code** tab. Here, you need to locate the action URL of the form (can also search for "action" using browser search with Ctrl+F), and copy the URL (highlighted below).

![Getting the Action URL](https://3426011356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0NiyhsmXAcV5u1c6XK%2Fuploads%2Fvu2gatDno2enw2C5gMaZ%2Faction-url-b.png?alt=media\&token=cf367517-c0f0-4f4b-aa9b-b0894dde62e7)

#### Step 5: Adding the URL on Softr

Lastly, you just need to add the URL in the **MailerLite** field of your Button.

![Adding the Action URL](https://3426011356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0NiyhsmXAcV5u1c6XK%2Fuploads%2FdDp1ldT8Tp1hgbqsA8u0%2Fadded-b.png?alt=media\&token=0f6029c1-328a-4aff-aa5d-4bc2a1933cee)

That's it. You can now publish your form and start collecting subscriptions. See how that works below.

![Testing the email capture](https://3426011356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0NiyhsmXAcV5u1c6XK%2Fuploads%2Fu1sXCKlLTFYSHiUw6Kbb%2FScreen%20Recording%202022-06-08%20at%2018.28.50.gif?alt=media\&token=62a00e14-52b3-4a3e-81f9-4d903b4743a7)

{% hint style="warning" %}
If you're testing the form submission and not getting anything on MailerLite, that could be due to **Double Opt-In** being enabled in your Form settings. When it's enabled, the user that submits the form receives a confirmation email. Only after the submission is confirmed by the user, it is sent to Mailerlite. You can find more details on that [here](https://www.mailerlite.com/help/how-to-use-double-opt-in-when-collecting-subscribers).
{% endhint %}

## Sending Forms to MailerLite

In the previous section, we discussed how to capture emails with MailerLite, however you might also need to map a whole form with multiple field. Let's say you have a [Customizable Form](https://softr.gitbook.io/softr-documentation/building-blocks/form/custom-form) on Softr with the following fields: **Name**, **Email**, and **Message**.

![A Customizable Form on SOftr](https://3426011356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0NiyhsmXAcV5u1c6XK%2Fuploads%2FhkJLJcno0UIa3fFFdrKF%2Fform-b-1.png?alt=media\&token=2b1112f6-169a-4014-8332-14578ed1bf0f)

In order to receive the form submissions on MailerLite, you should build a similar form there as shown below.

![A custom form on Mailerlite](https://3426011356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0NiyhsmXAcV5u1c6XK%2Fuploads%2FlZxslbfl8jA843QpMMnH%2Fmailerlite-form-b.png?alt=media\&token=f787938d-e70a-437f-ad9e-80977cba240f)

Next, in the form configuration page, you need to go to the **HTML code** tab of the **Embed form into your website** section and, apart from grabbing the **Action URL** of the form, you should get the names of corresponding fields (e.g. **fields\[name]** for the **Name** field as shown below).

![Getting field names](https://3426011356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0NiyhsmXAcV5u1c6XK%2Fuploads%2Fzh0eBUDaRMEgwCj04h3F%2Fname-field-b.png?alt=media\&token=9fb36fcf-9e29-48ce-a8b2-dbf592f24817)

These names need to be pasted inside the **Tag** parameter of each of the form fields.

![Adding a field Tag](https://3426011356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0NiyhsmXAcV5u1c6XK%2Fuploads%2Fr1Cam2yEiWE9pKIa10Ux%2Fname-tag-b.png?alt=media\&token=24fc3c2a-ca68-4fc0-8338-d2d4ea2afad2)

As soon as you do the same for the rest of the fields and add the [Action URL](#how-to-locate-mailerlite-action-url), you're all set. Now, you can start receiving form submissions on MailerLite. Let's test the form to see how that works.

![Testing the form submission](https://3426011356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0NiyhsmXAcV5u1c6XK%2Fuploads%2FhSfJaKSzFfjSAld4AIx2%2FScreen%20Recording%202022-06-08%20at%2018.51.27.gif?alt=media\&token=663b2ff6-b161-46db-b03b-c4065e7fb0e4)
