Sync PostgreSQL data via API call to Gmail

Recipe ToolsData ParserMarketingUtilitiesDatabaseProductivitySales Enablement

What it does

When someone calls the getdetails API, this automation queries PostgreSQL for matching rows. It parses the response and sends the data through Gmail, or stops without retrying if an error occurs.

Who it's for

Data and analytics teams who need to retrieve PostgreSQL records through an API and share results by email.

How teams use this

Share database records by email

Call the getdetails API to retrieve rows from PostgreSQL and have the results sent to a recipient via Gmail automatically. The team gets the data without manual queries or exports.

Route queries to different teams

Use the same API call but send results to different email addresses based on the request type. Only the recipient changes, and the query logic stays the same.

Filter results before sending

Add a condition to the PostgreSQL query so only rows that meet specific criteria are included in the email. This requires a filter on the table selection step.

How it works

  1. Receive the API call. Someone calls the getdetails API in real time with a request for specific data from PostgreSQL.
  2. Query the database table. Select rows from the public.eaiesb table in PostgreSQL that match the request parameters in a batch operation.
  3. Parse the response data. Parse the JSON document returned from PostgreSQL using Json Parser so the data is formatted and ready to send.
  4. Send results by email. Send the parsed data through Gmail to the recipient, or if an error occurred, do not retry and stop the process.