# How to send welcome discount with SendGrid?

SendGrid has a Marketing module which you can use to send an automated welcome email to your new subscribers.

<figure><img src="/files/Ai0Q8VbvBqa9ROU1SVgt" alt=""><figcaption></figcaption></figure>

Make sure that your signup form or popup is adding subscribers to your contact list in SendGrid.

Create a discount automation in Personal Discount selecting "Other" as email marketing provider and "Welcome new subscribers" as campaign type.

Copy the code snippet that you can find at the bottom of the settings page in Personal Discount.

<figure><img src="/files/lxgPqlbmXpYmdfV75mVT" alt=""><figcaption></figcaption></figure>

Edit your email template in SendGrid and add a Code block.

<figure><img src="/files/LaAHZiSQoll292DQ5JuZ" alt=""><figcaption></figcaption></figure>

Paste the code snippet you copied from Personal Discount.

<figure><img src="/files/DMIFzuVtZHnJiPKCQ7vc" alt=""><figcaption></figcaption></figure>

Click on Update, and as a result you should see a discount code in your email template.

<figure><img src="/files/MUxU0GbRTOPKFomdj1x9" alt=""><figcaption></figcaption></figure>

Save the email template, navigate back to your automation settings and click on Set Live to activate the flow.

<figure><img src="/files/n3JGJeIIV0DdUz67nA8Z" alt=""><figcaption></figcaption></figure>

You can test if it works by manually adding a contact to your list.

<figure><img src="/files/yiKVNLbH7fByf8OTKJwF" alt=""><figcaption></figcaption></figure>

Some email clients don't show images by default. A recipient has to enable images to see the discount code.

<figure><img src="/files/Ohu1GMrmQipCu6M1g3Se" alt=""><figcaption></figcaption></figure>

After enabling images in the received welcome email you can see the discount code:

<figure><img src="/files/4gCeQxBmdwZqSPEcNH09" alt=""><figcaption></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/sendgrid/how-to-send-welcome-discount-with-sendgrid.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.
