Skip to main content
Connic

PostgreSQL Change Notifier

By Connic

Monitor PostgreSQL changes via LISTEN/NOTIFY, classify events by impact, and route notifications to the right team. Stores high-impact changes for auditing.

DevOpsIntermediatePostgreSQLHTTP Webhook
connic init my-project --templates=postgres-change-notifier

Overview

Listens to PostgreSQL NOTIFY events from database triggers and analyzes each change for significance. The change analyzer classifies events by impact level and routes notifications to the appropriate team using trigger_agent to call the notification dispatcher. High-significance events are stored in the database for audit trailing. Includes SQL examples for setting up database triggers.

Use cases

Order monitoring

Alert ops and sales teams when orders are cancelled, refunded, or when large orders arrive.

Security auditing

Track permission changes, user deletions, and sensitive field modifications in real-time.

Data sync notifications

Notify downstream systems when critical data changes via outbound webhooks to Slack, Teams, or PagerDuty.

Architecture

PostgreSQL NOTIFY
change-analyzer
Audit Events DB
notification-dispatcher
Outbound Webhook

Main template files

Install these files with connic init my-project --templates=postgres-change-notifier. The CLI places agent definitions in a folder named after the template under agents/.

postgres-change-notifier/
  agents/
    change-analyzer.yaml
    notification-dispatcher.yaml
  tools/
    notification_tools.py
  schemas/
    change-analysis.json
  requirements.txt
  README.md

Get started

Install the template, create a Connic project, and deploy through a connected Git repository or the CLI.

Prerequisites

  • Python 3.10+
  • A Connic account (create a project first)
  • Project credit for a connic/* model, or credentials for a BYOK provider
Create project
  1. Install and scaffold

    Install the SDK and create a project from this template.

    terminal
    pip install connic-composer-sdk
    connic init my-project --templates=postgres-change-notifier

    Then cd my-project

  2. Deploy

    Choose a deployment method. A connected Git repository deploys on push; use the CLI for projects without a connected Git repository.

    Git integration
    1. In Connic: Project Settings → Git & Environments, connect the GitHub repository

    2. On the same page, map a branch (e.g. main) to the Production environment

    3. Push the scaffolded project to that repository

    terminal
    git add .
    git commit -m "Add PostgreSQL Change Notifier template"
    git push origin main
    CLI deploy
    1. In Connic: Project Settings → API Keys & MCP Auth, create an API key and copy project ID

    2. Run connic login in the project folder

    3. Use connic dev to try with hot-reload, connic test to run suites, or connic deploy for production

    terminal
    connic login
    connic dev     # Ephemeral dev env with hot-reload
    connic test    # Run declarative test suites
    connic deploy  # Deploy to production
  3. Connect and configure

    Add a PostgreSQL connector with the database credentials and LISTEN channel. Set up a trigger function to send NOTIFY events (see the README for SQL examples). Use a connic/* model, or add BYOK credentials under Project Settings → LLM Provider.

Template source

Browse the full template, contribute improvements, or fork it for another use case.

connic-org/connic-awesome-agents/tree/main/postgres-change-notifier

Information

Publisher
By Connic
Difficulty
Intermediate
Works with
PostgreSQL, HTTP Webhook
Source
GitHub