# 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FEAKAEpssPJN6TQy2T48o%2Fshopify-personal-discount-code-add-mailterlite-automation-animated.gif?alt=media&#x26;token=4b55ac87-da0b-4d3f-a40a-d0f9a4b7e498" 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](https://docs.personaldiscount.io/personal-discount-for-shopify/configure-discount).

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

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2F6iDkFEYqSUXrwnbmsojB%2Fshopify-personal-discount-code-snippet-mailerlite-welcome-automation.gif?alt=media&#x26;token=5879428d-8245-4486-93cc-a4137e929a8a" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FytjK7QVraPOf6aY3UkDL%2Fmailerlite-create-new-automation-workflow-animated.gif?alt=media&#x26;token=eb95227c-f3ac-4495-9e60-1135904e8445" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2Fucg2zO1YEsyz8rsAZzIZ%2Fmailerlite-set-joins-group-trigger-animated.gif?alt=media&#x26;token=864a450a-b033-42f3-99f0-f4143e0d330e" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2Ff4zcJLk26dBsX3nJJSNm%2Fmailerlite-add-action-to-your-automation-animated.gif?alt=media&#x26;token=2aa21f15-a4d5-47f2-885c-3b0671a1b5b4" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FTiLHWuYBl15Ivxs4eSlK%2Fmailerlite-design-email-drag-and-drop-editor-animated.gif?alt=media&#x26;token=01aa0a94-6866-43a0-a118-37749e4ae3de" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2Fnl5vY84ZfqDoOAM8o19b%2Fmailerlite-insert-html-block-with-shopify-personal-discount-code-snippet-animated.gif?alt=media&#x26;token=8164905e-0eb9-47f4-8600-197bff8bb19f" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FLsA2PyrE5Hb2VlDmdl7C%2Fmailerlite-activate-welcome-new-subscribers-workflow-animated.gif?alt=media&#x26;token=b29d94d1-9ee7-4f4a-ba05-305382a400de" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2Fc2oozk8mAmDaxhvS9lAz%2Fwelcome-to-our-newsletter-mailerlite-shopify-personal-discount--code-annotated.png?alt=media&#x26;token=0f1a8f1f-14c5-4d6c-8654-60ee05e32c13" 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>
