# 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="/files/oEbOk9XhimpoKGHZeeNY" 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](/personal-discount-for-shopify/configure-discount.md) may be helpful.

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

<figure><img src="/files/jnbb1lV39yEmmPlhc2Vp" 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="/files/vk0ZMzmX6hxLuNRmlHNS" 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="/files/IjTQGuE5VJl6RaxU9keO" 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="/files/KKIE3IuP70cZbjQshE7z" 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="/files/qWaXxrXBHYxPjG59eRjE" 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="/files/xj8iSZrupgAyovtonuGL" 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="/files/yZWqOrjsSWdzbptBXjUO" 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="/files/vAsFtH03rzxrGl2hK8Iu" 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="/files/ZJNv0nVOSBSbgWeUKnKN" alt="Welcome email with a discount code for new subscribers in Campaigner"><figcaption><p>Welcome email with a discount code</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/campaigner/how-to-integrate-personal-discount-and-campaigner-to-send-welcome-emails-with-a-discount-code.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.
