Skip to contentSkip to navigationSkip to topbar
On this page

Sending SendGrid Emails For New PostgreSQL Custom Query Row Matches


If you want to send emails automatically through SendGrid when new custom PostgreSQL rows are created, you can do that using Zapier(link takes you to an external page).

You will need:


Steps

steps page anchor
  1. Getting your accounts ready
  2. Connecting your accounts

Getting your accounts ready

ready page anchor

To connect your PostgreSQL account to Zapier you will need an active PostgreSQL, and a database that you wish to pull data from. To get started with PostgreSQL, including information on how to install the program and how to create a database, go here(link takes you to an external page). You can learn more about getting started with PostgreSQL on Zapier, here(link takes you to an external page).

To link your PostgreSQL to SendGrid, you must have an active SendGrid account. To learn more about getting started with SendGrid basics, start here. For more information about getting started with SendGrid on Zapier, go here(link takes you to an external page).

Connecting your accounts

connect page anchor

Click here to Send SendGrid emails for new PostgreSQL custom query row matches(link takes you to an external page).

  1. Choose your PostgreSQL account from the list of accounts, or connect a new account.
  2. To connect a new account, you will need the IP address or hostname of where your database is. Input this data in the Host field, indicate if you use an alternate Port, and fill in the Database and Username fields with the appropriate data. You may also need to fill out the Password field if your database user requires it.
Connecting PostgreSQL.
  1. Create or fill in the Custom Query you wish to use. Click Save + Continue.
PostgreSQL selection.
  1. Choose your SendGrid account from the list of accounts, or connect a new account.
  2. To connect your SendGrid account to Zapier for the first time, you will enter the credentials of an API/mail account. If you have not created this account, you can do so here(link takes you to an external page).
Credential entry.
  1. Using fields from PostgreSQL, create and customize the email message that the Zap will send. The required fields for this step are To, From, and Subject, but you may fill in further fields if you desire to do so.
Email creation.
  1. Click Save + Finish.

Now test the Zap to make sure it works. Once you're satisfied with the results, a new SendGrid email will be sent whenever your custom query is matched in your PostgreSQL.

(information)

Info

If you ever want to change this PostgreSQL and SendGrid integration, just go to your Zapier dashboard(link takes you to an external page) and tweak anything you'd like.

You can also check out all that's possible with PostgreSQL on Zapier(link takes you to an external page), and other ways to connect PostgreSQL and SendGrid(link takes you to an external page).

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.