PostgreSQL Change Notifier
Monitor PostgreSQL changes via LISTEN/NOTIFY, classify events by impact, and route notifications to the right team. Stores high-impact changes for auditing.
connic init my-project --templates=postgres-change-notifierOverview
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
Scaffolded project structure
Running connic init my-project --templates=postgres-change-notifier creates this file tree.
postgres-change-notifier/
agents/
change-analyzer.yaml
notification-dispatcher.yaml
tools/
notification_tools.py
schemas/
change-analysis.json
requirements.txt
README.mdGet started
Install the template, create a Connic project, and deploy. Choose Git (automatic on push) or CLI (works with any provider).
Prerequisites
- Python 3.10+
- A Connic account (create a project first)
- API key for your LLM provider (e.g. Gemini, OpenAI) to add in project variables
Install and scaffold
Install the SDK and create a project from this template.
pip install connic-composer-sdkconnic init my-project --templates=postgres-change-notifierThen cd my-project
Deploy
Pick your deployment method. Git auto-deploys on push; CLI works with GitLab, Bitbucket, or no Git.
Git integration
- In Connic: Project Settings → Git Repository, connect your GitHub repo
- Settings → Environments: map branch (e.g.
main) to Production - Push your scaffolded project to that repo
git add .
git commit -m "Add PostgreSQL Change Notifier template"
git push origin mainCLI deploy
- In Connic: Project Settings → CLI, create an API key and copy project ID
- Run
connic loginin your project folder connic testto try with hot-reload, orconnic deployfor production
connic login
connic test # Ephemeral dev env with hot-reload
connic deploy # Deploy to productionConnect and configure
Add a PostgreSQL connector with your database credentials and LISTEN channel. Set up a trigger function to send NOTIFY events (see the README for SQL examples). Add your LLM provider API key in Project Settings → LLM Provider API Keys.
Template source
Browse the full template, contribute improvements, or fork for your own use.
connic-org/connic-awesome-agents/tree/main/postgres-change-notifierExplore other templates
View allS3 Document Pipeline
Auto-process documents uploaded to S3 with text extraction, classification, and routing. Handles PDFs, images, and text files with retries.
SQS Order Processor
Validate and fulfill orders from SQS queues with fraud detection, inventory checks, and concurrency keys. Results publish to an outbound queue.
Customer Support
AI ticket triage with sentiment analysis and RAG-powered response drafting. Classifies by priority, blocks spam, and stores new solutions.
Compliance Auditor
Scheduled compliance scanning combining web search for regulatory updates, MCP docs, and knowledge base history. Produces scored summaries.