Skip to main content
PostgreSQL → Google Sheets

Export PostgreSQL to Google Sheets
on a schedule, in plain English.

Push Postgres query results or table snapshots into Google Sheets automatically — no CSV exports, no Zapier task quotas, no manual refreshes. Just describe what you want.

TL;DR

rsync.ai generates a SQL query from your plain-English description, runs it against PostgreSQL on the schedule you set, and writes the results to your Google Sheet — replacing or appending rows. Column types are mapped automatically: dates display correctly, booleans become checkboxes, numbers get the right format. Works with OAuth or service account auth. Self-hosted, source-available.

  • Scheduled export on any cadence — plain-English schedule description
  • Full replace or incremental append mode
  • Automatic cell type mapping — dates, checkboxes, currency
  • Service account auth — no OAuth token expiry surprises
How it works

How to sync PostgreSQL to Google Sheets — 5 steps

From connecting Postgres to rows appearing in your spreadsheet.

  1. 1

    Connect PostgreSQL

    Provide host, port (default 5432), user, password, and database name. The user needs SELECT on the tables or views you want to export — no replication privilege required for scheduled snapshot exports. rsync.ai supports self-hosted Postgres 10+, Amazon RDS, Aurora, Google Cloud SQL, Supabase, and Neon. SSL and SSH tunnel are both supported.

    host · port · user · password · database — SELECT only
  2. 2

    Connect Google Sheets

    Authenticate via OAuth (click 'Sign in with Google') or a Google service account. For service accounts, rsync.ai shows you the service account email (e.g. rsync-export@your-project.iam.gserviceaccount.com) — share your target spreadsheet with that email as Editor. Service accounts are recommended for scheduled pipelines so the connection doesn't break if a user's OAuth token expires.

    OAuth · or service account (recommended for scheduled runs)
  3. 3

    Describe the sync in plain English

    Type what you want: 'Export the last 1000 orders with their status and total from Postgres to Sheet1 in the Orders spreadsheet every morning at 8am.' rsync.ai generates the SQL query, maps the column types, and proposes the target spreadsheet, sheet tab name, and header row. You can also reference an existing view or write a custom SELECT.

    No SQL required — rsync.ai generates it from your description
  4. 4

    rsync.ai maps column types to Sheets cell formats

    rsync.ai converts PostgreSQL types to the closest Google Sheets cell type: INTEGER and BIGINT→Number, NUMERIC/DECIMAL→Currency or Number, TIMESTAMPTZ and TIMESTAMP→Date+Time, DATE→Date, BOOLEAN→Checkbox, TEXT and VARCHAR→Text, UUID→Text. Cell formats are applied automatically so dates display correctly and currencies show two decimal places.

    INTEGER→Number · TIMESTAMPTZ→Date · BOOLEAN→Checkbox · NUMERIC→Currency
  5. 5

    Approve and run on schedule

    rsync.ai shows a preview of the first 5 rows, the target sheet and tab, and the schedule (e.g. 'Daily at 08:00 UTC'). Approve and the first run executes immediately. Subsequent runs either replace the sheet contents (full replace mode) or append new rows (incremental mode, keyed on a timestamp or ID column). Watch run history and row counts in the rsync.ai UI.

    Full replace or incremental append · watch live in UI

PostgreSQL → Google Sheets type mapping

Default cell format mapping. Override any column format in the approve step.

PostgreSQL column (type)Google Sheets cell formatNotes
id (INTEGER)id (Number)Integer formatted as number — no decimal places.
created_at (TIMESTAMPTZ)created_at (Date+Time)Converted to UTC. Displayed in Sheets as 'YYYY-MM-DD HH:MM:SS'.
customer_name (TEXT)customer_name (Text)Plain text. Long values truncated at 50,000 characters (Sheets cell limit).
is_paid (BOOLEAN)is_paid (Checkbox)TRUE→checked, FALSE→unchecked. Sheets renders as a checkbox cell.
total (NUMERIC(10,2))total (Currency)Formatted as currency with 2 decimal places. Currency symbol from sheet locale.
order_uuid (UUID)order_uuid (Text)Stored as a plain text string (36-character UUID format).

rsync.ai vs. Zapier, Fivetran, manual CSV for PostgreSQL → Google Sheets

What you give up — and gain — choosing rsync.ai for Postgres to Sheets pipelines.

Feature
rsync.aiyou
Zapier
Fivetran
Manual CSV
Plain-English pipeline setup
Scheduled Postgres → Sheets export
Incremental append mode
Service account auth (no OAuth expiry)
Self-hosted (data stays in your network)
Source-available connector code (auditable)
No per-task / per-row pricing
PII column masking before Sheets write

PostgreSQL to Google Sheets — frequently asked

How many rows can rsync.ai write to Google Sheets?

Google Sheets has a hard limit of 10 million cells per spreadsheet. For a table with 20 columns, that's 500,000 rows maximum. rsync.ai warns you at pipeline setup if your query result would exceed the sheet's capacity. For larger datasets, use the postgres-to-s3 pipeline to export to Parquet and query with Athena or BigQuery — Google Sheets is best for operational reports under ~100k rows.

Does rsync.ai do incremental updates or full replace each run?

Both modes are supported. Full replace mode clears the sheet and rewrites all rows on each run — safest for reports where the full result set changes (e.g. a daily summary). Incremental append mode appends only new rows, keyed on a monotonically increasing column (id or created_at) — useful for event logs or order feeds where you want cumulative history. You choose the mode in the approve step.

Can I write to multiple sheets or tabs in the same spreadsheet?

Yes. Each rsync.ai pipeline targets one sheet tab. You can create multiple pipelines pointing to the same spreadsheet but different tabs — e.g. 'orders' tab for the orders query, 'users' tab for the user count summary, 'revenue' tab for the daily revenue rollup. Each pipeline runs on its own schedule independently.

How are PostgreSQL column types mapped to Google Sheets?

rsync.ai applies the following mapping: INTEGER / BIGINT / SMALLINT → Number (0 decimal places), NUMERIC / DECIMAL → Number or Currency (2 decimal places), REAL / DOUBLE PRECISION → Number (scientific notation for large values), TIMESTAMPTZ / TIMESTAMP → Date+Time (UTC), DATE → Date, TIME → Time, BOOLEAN → Checkbox, TEXT / VARCHAR / CHAR → Text, UUID → Text, JSONB / JSON → Text (serialized as JSON string), arrays → Text (serialized). You can override any format in the approve step.

OAuth vs service account — which should I use?

Service accounts are strongly recommended for scheduled pipelines. OAuth tokens expire and require user re-authorization (typically every 7 days for unverified apps). A service account is a non-human identity that never expires — you share the spreadsheet with the service account email once, and the pipeline runs indefinitely. OAuth is fine for one-off exports or testing. rsync.ai shows you the service account email to share with during setup.

Can I schedule the export — for example, every morning at 8am?

Yes. Describe the schedule in plain English: 'every morning at 8am UTC', 'every Monday at 9am London time', 'every hour', 'every 15 minutes'. rsync.ai converts this to a cron expression and runs the pipeline on that cadence. You can edit the schedule at any time in the UI without touching any config files.

Can rsync.ai mask or exclude PII columns from the Google Sheets export?

Yes. Mark any column as `masked` — rsync.ai replaces the value with a SHA-256 hash or omits the column entirely from the Sheets export. You can also exclude columns at the SQL query generation step: 'Export orders but exclude the customer_email and phone columns.' rsync.ai removes those columns from the SELECT before running the query.

Is rsync.ai self-hosted for PostgreSQL to Google Sheets?

Yes. The full rsync.ai stack runs on your own infrastructure via `docker compose up`. Your PostgreSQL credentials and Google OAuth tokens or service account keys are stored in a Postgres control plane you also host — nothing leaves your network. License is Elastic License 2.0 — free to self-host, cannot be resold as a managed service.