> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useparagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Personalize Welcome Emails

> Personalize and send meaningful welcome emails to new users after a couple of hours.

Let's say we want to send a personalized welcome email to users a couple of hours after they've signed up on our app.

**We'll build a workflow that does this in 5 minutes**.

<Info>
  Don't have a Paragon account yet?

  [Sign up for Paragon](https://app.useparagon.com/signup) on our website to get started!
</Info>

## 1. Create an event-based trigger

In this example, let's assume the frontend of our app connects user sign-ups to our PostgreSQL database. We'll start by setting up our Paragon workflow with an [Event-based trigger](/automate/building-workflows/triggers#event-based) so that our workflow runs when a new user is created in our PostgreSQL database.

[Connect your PostgreSQL database](/automate/resources/integrations-catalog/postgresql#setup-guide) to Paragon and create a new column labeled `signedUp`. We'll use this column to let us know the date and time our user signs-up.

<Frame caption="">
  <img src="https://mintcdn.com/paragon/867oBBVpxd2C3zc4/assets/Using%20the%20PostgreSQL%20trigger%20in%20Paragon.png?fit=max&auto=format&n=867oBBVpxd2C3zc4&q=85&s=b5158c2e642e853a6ee3c4932c664efe" width="503" height="644" data-path="assets/Using the PostgreSQL trigger in Paragon.png" />
</Frame>

Under **Choose an action**, select **New record created**.

Under **Table**, choose the table you'd like to check for new users.

Under **Order by**, choose the column that **represents the time and date** the user signed up. In this example, we'll select `signedUp`.

<Frame caption="">
  <img src="https://mintcdn.com/paragon/7RZyQGncIlY8Xl4A/assets/Ordering%20columns%20by%20signup%20date%20in%20Paragon.gif?s=440b65ff3e5941c58aa23fd6f2bc2838" width="487" height="236" data-path="assets/Ordering columns by signup date in Paragon.gif" />
</Frame>

## 2. Delay immediately sending the email

We'll use the **Delay** step to wait a certain amount of time before executing the next steps in our workflow.

<Frame caption="">
  <img src="https://mintcdn.com/paragon/EuLlf5VxgsSnEq57/assets/Delaying%20a%20workflow%20in%20Paragon.gif?s=b945c0ae44de901b892b737d2393e87c" width="891" height="443" data-path="assets/Delaying a workflow in Paragon.gif" />
</Frame>

In this example, we want to delay our welcome email to our new users by 6 hours. Once the workflow reaches this point, it'll wait 6 hours before continuing with the next steps.

<Info>
  **Note:** Delaying a workflow doesn't prevent future executions of your workflow from starting.

  Check out your workflow executions in your [Task History](/automate/building-workflows/viewing-task-history#overview).
</Info>

## 3. Send the user an email

Paragon supports [several integrations](/automate/resources/integrations-catalog#messaging) for messaging – and for this example, we'll use [Sendgrid](/automate/resources/integrations-catalog/sendgrid) to send each user an email. Add a Sendgrid step to your workflow, connect your Sendgrid account, and choose the **Send Email** action.

Under **Recipients**, click the dropdown to bring up the variable menu and choose the user's email address from the [PostgreSQL event-based trigger.](/automate/resources/integrations-catalog/postgresql#event-trigger) In the **Subject** and **Message** fields, you can insert data from previous steps (e.g. your users' name, etc.) by typing `{{` to bring up the variable menu.

<Frame caption="">
  <img src="https://mintcdn.com/paragon/HSp5hB8tE4Z6e44m/assets/Sending%20Sendgrid%20emails%20with%20template%20data%20in%20Paragon.png?fit=max&auto=format&n=HSp5hB8tE4Z6e44m&q=85&s=ebd2a4cb5d207100f05cc20b04a8e662" width="949" height="1004" data-path="assets/Sending Sendgrid emails with template data in Paragon.png" />
</Frame>

## 4. Deploy your workflow

Now that your workflow is all set up, deploy your workflow by clicking the "Deploy" button in the top-right of your screen. Once you do, your workflow's Trigger URL will go live and you can start making requests to it.

<Frame caption="">
  <img src="https://mintcdn.com/paragon/jCM_Y_j0HttScr1R/assets/Deploying%20a%20workflow%20in%20Paragon.gif?s=6197999a22c03d21f2ec33a73861e0dc" width="517" height="309" data-path="assets/Deploying a workflow in Paragon.gif" />
</Frame>

Great work! We just built a workflow to send personalized welcome emails to new users a couple of hours after they've signed up!

Of course, this is just a basic example of what you can do with Paragon, and there's much more we could add to this workflow, e.g. issuing a refund, marking the user as canceled in your database, etc. We hope it gives you an idea of how to use Paragon for your own internal workflows!

<Info>
  Want to build your own workflows?

  [Sign up for Paragon](https://app.useparagon.com/signup) on our website to get started!
</Info>
