Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

PostgreSQL → Slack Alert Pipeline

Send a Slack notification whenever new high-value orders appear in your PostgreSQL database.

What it does

  1. Queries PostgreSQL for orders above a threshold (e.g. > £1,000)
  2. Sends a Slack message per order via Incoming Webhook
  3. Uses incremental sync — only processes new orders since last run

Setup

1. Configure your PostgreSQL connection

drt init   # select "postgres" as source

Edit ~/.drt/profiles.yml:

default:
  type: postgres
  host: localhost
  port: 5432
  dbname: your_database
  user: your_user
  password_env: POSTGRES_PASSWORD

2. Set your Slack webhook

Create an Incoming Webhook in Slack, then set the environment variable:

export SLACK_WEBHOOK_URL="https://hooks.slack.com/services/YOUR/WEBHOOK/URL"

3. Run

drt run

Files

postgres_to_slack/
├── drt_project.yml
├── syncs/
│   ├── alert_high_value_orders.yml
│   └── models/
│       └── high_value_orders.sql
└── README.md