# How to welcome new subscribers with a discount code using MailerLite

In this article, we will guide you on how to create a welcome campaign in MailerLite.

Firstly, navigate to your **Shopify dashboard** > **Apps** > **Personal Discount**. Next, click the **Add automation** button, select **MailerLite** as your email service provider, and **Welcome new subscribers** as a campaign type.

<figure><img src="/files/qboYongfmwWTzGrYR14Z" alt="Create Personal Discount automation for Shopify store with MailerLite animated"><figcaption><p>Personal Discount automation for MailerLite</p></figcaption></figure>

Then set up your automation details. For more information, take a look at the article on [how to configure discount](/personal-discount-for-shopify/configure-discount.md).

Save your automation and copy the code snippet to the clipboard.

<figure><img src="/files/wbYWrzQdtirNvZp7lf9r" alt="Copy Personal Discount code snippet to the clipboard animated"><figcaption><p>Copy the code snippet to clipboard</p></figcaption></figure>

Now you can switch over to your MailerLite admin panel. Hit **Automation** > **Create workflow**.

<figure><img src="/files/oL7URZI9yaFpBq4QvavB" alt="MailerLite create worflow animated"><figcaption><p>MailerLite: create worflow</p></figcaption></figure>

Select the **When subscriber joins a group** trigger and the group where your Shopify customers are subscribed to.

<figure><img src="/files/x7xGpQdZVLvAKBjcJKWP" alt="MailerLite: set subscriber joins a group automation trigger"><figcaption><p>Set the worflow trigger MailerLite</p></figcaption></figure>

Now add the action that will be performed when a subscriber joins the group. In this case, it will be to send an email.&#x20;

<figure><img src="/files/SbrzKMV97p0gukn9M1Py" alt="MailerLite add triggered action to your automation animated"><figcaption><p>MailterLite: add an email action</p></figcaption></figure>

Let's prepare our email template. We can use the drag and drop editor for this.

<figure><img src="/files/wan8lo3mDSf8eZjhVLcQ" alt="How to select drag and drop editor method for creating email template animated"><figcaption><p>Drag and drop email template editor</p></figcaption></figure>

Now design your message template. Add the code snippet from Personal Discount to your automation. Drag and drop a **text** element to your message project. Next, **edit** this one. Switch over to the **HTML view**. Delete the existing code snippet and paste the one from Personal Discount. In the end, **Save** changes. When your template is ready, hit **Done editing**.

<figure><img src="/files/2nV2QNcSE1x65GLX2gYh" alt="Paste the HTML code snippet into MailerLite email template animated"><figcaption><p>Paste the code snippet into message template</p></figcaption></figure>

When your automation is ready, it's time to activate it.

<figure><img src="/files/CY8mfWanw32eOFm4AE2d" alt="Activate MailerLite welcome workflow animated"><figcaption><p>Activate MailerLite welcome automation</p></figcaption></figure>

From now, when someone subscribes to your newsletter, they will receive a welcome email with a discount code for their next purchase.

<figure><img src="/files/V0s4ukvvo6bEQ1uZAODL" alt="Welcome message with a discount code using MailerLite and Personal Discount for Shopify annotated"><figcaption><p>Welcome message with a discount code using MailerLite and Personal Discount for Shopify</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.personaldiscount.io/personal-discount-for-shopify/integrate-personal-discount-with-your-email-service-provider/mailerlite/how-to-welcome-new-subscribers-with-a-discount-code-using-mailerlite.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
