PostgreSQL Integration

Automated PostgreSQL reports,
delivered to any inbox.

Schedule any PostgreSQL query to run on a cadence and email the results as a formatted Excel file. Your stakeholders get fresh data without logging into anything.

Setup

Connected in four steps.

01

Add your PostgreSQL connection

Enter your host, port, database name, and credentials. Query2Mail encrypts them with AES-256 immediately — they're never stored in plaintext.

02

Write your SQL query

Paste any SELECT query. Use any PostgreSQL feature — window functions, CTEs, JSON aggregation. If it runs in psql, it runs here.

03

Set a schedule and add recipients

Choose daily, weekly, or monthly. Add the email addresses of anyone who should receive the report. They need no account.

04

Excel lands in their inbox

At the scheduled time, Query2Mail runs your query against your PostgreSQL instance, formats the results into a clean Excel file, and sends it automatically.

-- Example: weekly revenue by region

SELECT region, SUM(revenue) AS total_revenue, COUNT(*) AS orders

FROM sales

WHERE created_at >= date_trunc('week', now())

GROUP BY region

ORDER BY total_revenue DESC;

→ Runs every Monday 8:00 AM → Excel emailed to finance@company.com

Use cases

What teams use it for

Your PostgreSQL database. Any inbox.

Free to start. No credit card required.

Connect your database →