# How to integrate Personal Discount and Campaigner to send welcome emails with a discount code

Navigate to your **Shopify dashboard** > **Apps** > **Personal Discount**. Then click **Add automation** button and select **Campaigner** as your Email Service Provider and **Welcome new subscribers** as the Campaign Type.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2F05ru4gha53sxVkuHbRdS%2Fpersonal-discount-code-shopify-campaigner-welcome-new-subscribers-add.gif?alt=media&#x26;token=109ab420-4485-4ecc-9aa7-21a6e17df903" alt="How to add automation in the Personal Discount app"><figcaption><p>Add Personal Discount automation</p></figcaption></figure>

Next, specify the automation details. The article on [how to configure your discount](https://docs.personaldiscount.io/personal-discount-for-shopify/configure-discount) may be helpful.

When your automation is ready, save it and copy the code snippet to the clipboard.&#x20;

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2F6N6rMpC31teXDPZXzA2K%2Fpersonal-discount-shopify-campaigner-welcome-new-subscribers-code-snippet.gif?alt=media&#x26;token=2299db73-750d-4ad2-883f-6da4497d73ad" alt="How to copy Personal Discount code snippet to the clipboard animated"><figcaption><p>Copy Personal Discount code snippet</p></figcaption></figure>

Switch over to your **Campaigner admin panel**. Let's start by preparing an email template. Click **Email Campaigns** and we will use the **Drag & Drop Editor** to create a new message.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FD3uY88WHjmoAwbzMig3w%2Fpersonal-discount-code-shopify-campaigner-welcome-new-subscribers.gif?alt=media&#x26;token=f644a2c5-c029-4909-83f5-dc97014e5d2c" alt="How to create a new email campaign in campaigner animated"><figcaption><p>Create a new Email Campaign</p></figcaption></figure>

Now insert an **HTML element** into your message template and paste the **code snippet** from Personal Discount there. Then hit **Preview changes** and **Apply changes**.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FXfrq7oeLwhuyHeEEq7iv%2Fpersonal-discount-code-shopify-campaigner-paste-the-code-snippet.gif?alt=media&#x26;token=8e1869d8-bce6-4e1a-bb60-a94efe83e943" alt="Insert an HTML element to the Campaigner email template animated"><figcaption><p>Paste the code snippet to your template</p></figcaption></figure>

Click **Next** to go to the further settings. In the end, don't forget to check the option that allows using this template in a workflow.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FV6GHCwImy0gC4pAwLtPO%2Fcampaigner-shopify-workflow-email-campaign.png?alt=media&#x26;token=9f5b19d8-b02b-439a-ba39-eda99e6343a4" alt="Animated: How to paste the code snippet to your Campaigner emaAnimated: How to paste the code snippet to your Campaigner email templateil template"><figcaption><p>Paste the code snippet to the email template</p></figcaption></figure>

It's time to create automation. Navigate to **Workflows** > **New Workflow**.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FeKalvRhrKnyqgYjK6V4X%2Fcampaigner-new-workflow-annotated.png?alt=media&#x26;token=75b89c60-6d91-494b-b096-0a3d2237e67e" alt="Annotated: Create new Campaigner workflow"><figcaption><p>Campaigner: new workflow</p></figcaption></figure>

Now we will work with the workflow editor. Right-click the default connection and **delete** it. Then drag and drop **Send Email** box and create new connections between nodes.&#x20;

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FcOq55bWRhhWQ3hwP5quv%2Fcampaigner-create-workflow-animated.gif?alt=media&#x26;token=468849eb-cbf3-478f-bc48-d048d0046d37" alt="Animated: build the welcome email workflow in Campaigner"><figcaption><p>Build your welcome email workflow</p></figcaption></figure>

Set the trigger. Double click it. Your trigger type is **Rules**. Then select from dropped-down menus the following values:

Filter Type: **List Membership**\
Contact: **Added to**\
List: **your list name**

Then double click **Send Email** box and check the message that will be assigned to this automation.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FrA2PQ4BRUlHomOyoWShm%2Fcampaigner-set-workflow-trigger-and-email-template-animated.gif?alt=media&#x26;token=49f07375-677f-4d09-9c4e-d4c20732b10d" alt="Animated: Set trigger and select message in Campaigner workflow"><figcaption><p>Set the trigger and message in Campaigner</p></figcaption></figure>

Now you can validate and activate your workflow.&#x20;

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FtGpgrhFnMJaLIIvXtvze%2Fcampaigner-activate-workflow-animated.gif?alt=media&#x26;token=4b5f07cc-b20f-4bf7-9490-944476429685" alt="Animated: How to activate Campaigner workflow"><figcaption><p>Activate Campaigner workflow</p></figcaption></figure>

From now your customers will be rewarded with a discount code for joining the newsletter.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FgIF2kmcdqeTSq57F8GHa%2Fwelcome-new-subscribers-campaigner-email-with-shopify-personal-discount-code.png?alt=media&#x26;token=28ba136c-e56f-448d-b4f1-491071fed89c" alt="Welcome email with a discount code for new subscribers in Campaigner"><figcaption><p>Welcome email with a discount code</p></figcaption></figure>
