n8n-nodes-cloudsql-postgres
v1.2.1
Published
n8n node for Google Cloud's CloudSQL Postgres server, using the Cloud SQL Connector for authentication.
Maintainers
Keywords
Readme
n8n-nodes-cloudsql-postgres
This is an n8n community node package that lets you work with Google Cloud SQL for PostgreSQL directly from n8n workflows.
It includes:
- A database node for common SQL operations (select/insert/update/upsert/delete and custom queries)
- A trigger node for PostgreSQL
LISTEN/NOTIFY, including optional auto-created table-change triggers
n8n is a fair-code licensed workflow automation platform.
Installation
Operations
Credentials
Compatibility
Usage
Development
Resources
Version history
Installation
Follow the community nodes installation guide.
Package name:
n8n-nodes-cloudsql-postgresFor local development:
npm install
npm run devOperations
Cloud SQL (Postgres)
Supported operations:
- Select rows from a table
- Insert rows into a table
- Update rows in a table
- Insert or Update (upsert)
- Delete Table/Rows with
truncate,delete, ordrop - Execute Query for custom SQL
Notable capabilities:
- Query batching modes (
single,independently,transaction) - Dynamic schema/table/column loading
- Query parameter support (
$1,$2, ...) - Optional return columns for write operations
- Optional conversion behavior for large numbers and empty strings
Cloud SQL (Postgres) Trigger
Supported trigger modes:
- Table Row Change Events: create and listen on a trigger/channel for
INSERT,UPDATE, orDELETE - Advanced: listen on an existing PostgreSQL channel
Credentials
Credential name in n8n: Cloud SQL (Postgres)
Required fields:
- Instance Connection Name (
project:region:instance) - IP Type (
PUBLIC,PRIVATE,PSC) - Authentication Type (
PASSWORDorIAM) - Database
- Maximum Number of Connections
- Google Auth Method (
Service Account JSON KeyorApplication Default Credentials)
Authentication behavior:
PASSWORDmode uses databaseUser+PasswordIAMmode uses IAM DB authentication with the service account identity- If
Service Account JSON Keyis selected, provideService Account JSON - If
Application Default Credentialsis selected, credentials are taken from the runtime environment
Compatibility
- Uses
n8nNodesApiVersion: 1 - Database node versions available:
2through8(default:8) - Trigger node version:
1
This package uses external dependencies (@google-cloud/cloud-sql-connector, google-auth-library, pg-promise) and has n8n.strict = false.
Because of that, this package is intended for self-hosted n8n and is not eligible for n8n Cloud verification.
Usage
Basic database setup
- Add Cloud SQL (Postgres) credentials.
- Set
Instance Connection Name,IP Type, and auth settings. - Add a Cloud SQL (Postgres) node and choose an operation.
- Select schema/table (or use expressions), then configure operation-specific fields.
Trigger setup
- Add a Cloud SQL (Postgres) Trigger node.
- Choose
Table Row Change Eventsto auto-manage trigger/function/channel. - Choose
Advancedto listen on an existing channel. - Activate the workflow to keep listening continuously.
Execute Query tips
- Use query parameters instead of string concatenation.
- Example query:
SELECT id, name
FROM users
WHERE status = $1 AND created_at >= $2- Set
Query Parametersto something like:active,2026-01-01
Development
Available scripts:
npm run dev- Start n8n with watch modenpm run build- Builddist/npm run lint- Run linternpm run lint:fix- Auto-fix lint issuesnpm run release- Run release flow
Resources
- n8n community nodes documentation
- n8n community nodes installation
- Google Cloud SQL Node.js Connector
- Cloud SQL for PostgreSQL docs
Version history
1.0.0- Initial stable release of the Cloud SQL PostgreSQL database + trigger nodes
