Skip to main content
PostgreSQL is a powerful, open-source relational database system with over 35 years of active development. Cargo’s native integration with PostgreSQL allows you to connect your database, create data models, and execute SQL operations directly in your workflows.
Supabase compatible — This integration works with Supabase, Neon, Railway, and any PostgreSQL-compatible database.

How to set up PostgreSQL

Prerequisites

Before connecting PostgreSQL to Cargo, ensure you have:
  • An active PostgreSQL server (version 9.6 or higher)
  • Network connectivity between Cargo and your PostgreSQL server
  • A database user with appropriate permissions
  • SSL enabled for secure connections (recommended)

Connection details

To set up the connection, provide the following details when creating the connector:
Use your PostgreSQL server’s hostname and credentials directly.

PostgreSQL actions

Once connected, you can use PostgreSQL in your workflows with the following actions:

Insert

Insert new records into a PostgreSQL table. Configuration Use cases
  • Lead capture – Insert new leads from form submissions or enrichment workflows
  • Event logging – Record workflow events and outcomes
  • Data aggregation – Store computed results for reporting

Update

Update existing records in a PostgreSQL table based on a matching column. Configuration Use cases
  • Data enrichment – Update records with enriched data from external sources
  • Status updates – Mark records as processed or update stages
  • Sync external changes – Keep PostgreSQL in sync with CRM or other systems

Upsert

Create new records or update existing ones based on a matching column. Uses PostgreSQL’s native ON CONFLICT clause for optimal performance. Configuration Use cases
  • Data sync – Keep your database updated regardless of whether records exist
  • Idempotent operations – Safely retry operations without creating duplicates
  • Master data management – Maintain a single source of truth
The upsert action requires a unique constraint or primary key on the matching column.

Delete

Delete records from a PostgreSQL table based on a matching column. Configuration Use cases
  • Data cleanup – Remove outdated or invalid records
  • GDPR compliance – Delete personal data on request
  • Workflow automation – Remove processed records from staging tables

PostgreSQL data models

Cargo allows you to create data models on top of your PostgreSQL data that can be used to trigger Plays and power workflows.

Creating PostgreSQL data models

To create a PostgreSQL data model:
  1. Navigate to Data Models in Cargo
  2. Click Create data model
  3. Select PostgreSQL as the source
  4. Configure the following fields:

Using PostgreSQL data models

Once created, your PostgreSQL data model can be used to:
  • Trigger Plays – Start automated workflows when data changes
  • Power enrichment – Use PostgreSQL data to enrich records in workflows
  • Create segments – Filter and target specific records from your data

Database user setup

For best security practices, create a dedicated user with only the necessary permissions:

Network configuration

If you restrict access to your PostgreSQL server, add these Cargo IP addresses to your firewall or security group:
  • 3.251.34.134
  • 54.220.135.99
  • 79.125.105.52
In Supabase, network restrictions are configured in Project Settings → Database → Network restrictions.

Security

  • All PostgreSQL connections can be encrypted using SSL/TLS
  • Credentials are securely stored and encrypted at rest
  • Cargo uses dedicated user credentials with minimal required permissions
  • We recommend enabling SSL and using strong passwords