Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

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 link your PostgreSQL database to Twilio SendGrid, you must have an active Twilio SendGrid account. To learn more, see the Twilio SendGrid API reference and how to get started with Twilio SendGrid on Zapier(link takes you to an external page).

Connecting your accounts

connect page anchor

To begin, open the Send SendGrid emails for new PostgreSQL custom query row matches(link takes you to an external page) Zap.

  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.
Form fields for PostgreSQL connection including host, port, database, schema, and username.
  1. Create or fill in the Custom Query you wish to use. Click Save + Continue.
PostgreSQL New Row Custom Query input field.
  1. Choose your SendGrid account from the list of accounts, or connect a new account.
  2. To connect your Twilio SendGrid account to Zapier for the first time, enter your API key. If you haven't created an API key, go to the API Keys page(link takes you to an external page) in the Twilio SendGrid Console.
  3. 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 form with fields for To, From, Subject, and Text.
  1. Click Save + Finish.

Test the Zap. When the Zap is active, matching PostgreSQL rows trigger emails through Twilio SendGrid.

(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).