DocsIntegrationsPostgreSQL
postgresql
Data Source

PostgreSQL

Query your PostgreSQL database directly from workflow nodes

PostgreSQL is a powerful open-source relational database. The CipherSense Agents PostgreSQL integration lets your workflows run SQL queries and fetch structured data as context for Agent nodes. Compatible with Amazon RDS, Google Cloud SQL, Supabase, Neon, and any self-hosted Postgres instance.

Official documentation

Setup

1

Gather your connection details

You'll need: host, port (default 5432), database name, username, and password. For cloud-hosted Postgres, whitelist your CipherSense Agents server's IP in the database's firewall or security group rules.

2

Create a least-privilege user (recommended)

For security, create a read-only database user instead of sharing admin credentials.

-- Create read-only user
CREATE USER CipherSense Agents_ro WITH PASSWORD 'your-password';
GRANT CONNECT ON DATABASE your_db TO CipherSense Agents_ro;
GRANT USAGE ON SCHEMA public TO CipherSense Agents_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO CipherSense Agents_ro;

-- Grant access to future tables automatically
ALTER DEFAULT PRIVILEGES IN SCHEMA public
  GRANT SELECT ON TABLES TO CipherSense Agents_ro;
3

Add the integration in CipherSense Agents

Navigate to your Project > Integrations > Add Integration > PostgreSQL. Fill in your host, port, database name, username, and password. Click Save & Test to verify the connection.

4

Use in a workflow

Drag a PostgreSQL node into the Visual Designer. Select your configured integration, choose an operation (query, insert, update), write your SQL, and map the results to downstream Agent node variables.

Connection Fields

Fields required when adding this integration in your Project › Integrations.

FieldRequiredDescription
Host
Required
Hostname or IP of your PostgreSQL server.
Port
Required
PostgreSQL default port is 5432.
Database
Required
Name of the database to connect to.
Username
Required
Database user with appropriate permissions.
Password
Required
Password for the database user.
Enable SSL
Optional
SSL mode for the connection: disable, prefer, or require.

Common Use Cases

Fetch CRM records for AI enrichmentQuery order data for analytics agentsLog AI outputs back to a database tableRead product catalog for Q&A workflows

Ready to connect PostgreSQL?

Add this integration from your project dashboard and wire it into a workflow.