# How to send welcome emails with discount codes for new subscribers via Ontraport?

[Personal Discount](https://apps.shopify.com/personal-discount) is highly-rated application to create unique discount codes. With Ontraport, you can automate sending emails. How to integrate them to get a great marketing campaign? Here we go.

#### Set up a discount automation in Personal Discount

Open your Shopify dashboard > Apps > Personal Discount and add a new automation. Select Ontraport from the list of Email Service Providers. Pick the campaign type 'Welcome new subscribers'.&#x20;

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FMlrmFP8CeJTeaUyX90Zl%2Fontraport-shopify-personal-discount-code-add-automation-animated.gif?alt=media&#x26;token=9966c807-c220-4f9d-b11f-48c5631d7fd9" alt=""><figcaption></figcaption></figure>

Next, specify discount details. At the bottom of the automation settings page, you'll find a code snippet. You'll need to copy and paste it into an email template in further steps.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FsxDKFChLa4sCC493VFX1%2Fpersonal-discount-shopify-ontraport-code-snippet.png?alt=media&#x26;token=3e279dc4-c9ee-4915-b43a-7d1ac35aa7dd" alt=""><figcaption></figcaption></figure>

#### Configure newsletter signup automation in Ontraport

Now switch over to your Ontraport dashboard. Click the 'Automations' button.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FMSxrlwhnEgUA2iTRTDpr%2Fpersonal-discount-shopify-ontraport-automation-create-codes.png?alt=media&#x26;token=dec3084a-0caf-4b15-87ee-d39afbd1eb61" alt=""><figcaption></figcaption></figure>

Then create a new automation. Ontraport has predefined automation templates for new subscribers. In this step select the proper one from the list.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FlaWJEJii9W0Z2YYr7Rmk%2Fpersonal-discount-shopify-new-subscribers-welcome-email-code.png?alt=media&#x26;token=e11a0632-43a9-4b31-b380-118f35d688f2" alt=""><figcaption></figcaption></figure>

You can see several branches and it could seem complicated but don't worry.&#x20;

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FjMwRQzsb7VixrCRoSdZ8%2Fpersonal-discount-shopify-ontraport-automation-new-subscribers-welcome-email-discont-code.png?alt=media&#x26;token=1618cb26-8f2f-477f-9b99-01bcdd6b4d08" alt=""><figcaption></figcaption></figure>

In our case two of them are unnecessary that you can delete.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2F3gPkM5s5o37nCqDlKBJF%2Fpersonal-discount-shopify-ontraport-automation-items.png?alt=media&#x26;token=03fd4cb6-5502-472b-9557-186d48accf17" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2Fv71alPs0yvngGii5TrYX%2Fpersonal-discount-shopify-ontraport-automation-items-branch.png?alt=media&#x26;token=2d419e76-bb40-4039-87ae-f30e9fdada38" alt=""><figcaption></figcaption></figure>

Now your automation looks more friendly. Following elements with the red dot have required settings that must be set before publishing.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FT8MplPjmeHvuSA21Hjiq%2Fcreate-discount-codes-with-ontraport-welcome-new-subscribers-personal-discount-shopify.png?alt=media&#x26;token=6b602e05-edf6-45be-9631-b919a87e33f1" alt=""><figcaption></figcaption></figure>

**Set up a sign-up form**

Let's start with the 'Submits form'. Click that and set triggers.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FPulahf8s4nOy8xkJnZfo%2Fpersonal-discount-shopify-ontraport-trigger-welcome-new-subscribers-form.png?alt=media&#x26;token=b64d0d40-db3c-4789-9090-80d510144b4a" alt=""><figcaption></figcaption></figure>

Create a new form or pick the existing one. The recipients will get an email with a discount code after filling out this form.

You can use Ontraport templates that could be modified easily or create your own.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FpAcRS3h5jaSpew0ylPV5%2Fpersonal-discount-shopify-app-create-discount-code-for-new-subscribers-form-template.png?alt=media&#x26;token=1a2d3e8a-d59d-4861-b110-ba034e038416" alt=""><figcaption></figcaption></figure>

Publish your form and put it on your page. Follow the instruction – attach the code snippet from Ontraport to include the form on your website.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FaU6NiAyrger1npnGeSnE%2Fpersonal-discount-shopify-ontraport-discount-codes-fill-out-form-new-subscribers.png?alt=media&#x26;token=4e58a241-1882-435c-9f07-8d5472ddf92b" alt=""><figcaption></figcaption></figure>

![](https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FGGSy3wbliom5hrAthoE1%2Fnew-subscriber-form-personal-discount-codes-ontraport.png?alt=media\&token=bc14899b-c231-4c98-a8f3-dfb7dbde78fb)

**Prepare your welcome email template**

If your form is ready, you need to prepare your email template with a discount code. Modifying it is similar to creating the form template – you're just working with blocks. So click the element 'Sent email' in your automation.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2Fyh4kld8M12y6SkD7lbk4%2Fpersonal-dicount-code-send-email-ontraport.png?alt=media&#x26;token=ddb39f0c-a61a-42b4-a0a5-6445b8fa6ebb" alt=""><figcaption></figcaption></figure>

From the drop-down menu select an email template or create a new one.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FN6b73NiQbXLMuMhWXmTX%2Fpersonal-dicount-code-email-template-ontraport.png?alt=media&#x26;token=4fe7911a-b37b-4707-a04f-eb17b4a10ae4" alt=""><figcaption></figcaption></figure>

Choose RAW HTML template type.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FLb2KrwxUmX514wwx0oFR%2Fpersonal-discount-code-ontraport-raw-html-template-welcome-subscribers.png?alt=media&#x26;token=f3704981-f2b8-46da-b7f9-5431b7e0f8f4" alt=""><figcaption></figcaption></figure>

Prepare your email template. Switch on the source view and paste the code snippet from Personal Discount. Then click Save at the right-top.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2F7nCo9KTbco4YTa9PY6Ax%2Fpersonal-discount-code-snippet-ontraport.png?alt=media&#x26;token=683f2454-85ad-4875-985d-4adfa7d4aafe" alt=""><figcaption></figcaption></figure>

Click Publish to start the automation. If you want to activate it later, click Save.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2F8FE6iUzdXjtn6plmAACC%2Fpersonal-discount-code-new-subscriber-ontraport-start-automation.png?alt=media&#x26;token=ec5ee4a5-6f11-4e48-808b-380194f1b0fd" alt=""><figcaption></figcaption></figure>

Well done! Now your new subscribers can enjoy the discount.&#x20;
