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.

You will need:

Steps

  1. Getting your accounts ready
  2. Connecting your accounts

Getting your accounts ready

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. You can learn more about getting started with PostgreSQL on Zapier, here.

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.

Connecting your accounts

Click here to Send SendGrid emails for new PostgreSQL custom query row matches.

  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.

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.

If you ever want to change this PostgreSQL and SendGrid integration, just go to your Zapier dashboard and tweak anything you'd like.

You can also check out all that’s possible with PostgreSQL on Zapier, and other ways to connect PostgreSQL and SendGrid.

Rate this page:

Need some help?

We all do sometimes. Get help now from the Twilio SendGrid Support Team.

Running into a coding hurdle? Lean on the wisdom of the crowd by browsing the SendGrid tag on Stack Overflow or visiting Twilio's Stack Overflow Collective.

Thank you for your feedback!

Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!

thanks-feedback-gif