How to send notifications from Postgresus to Slack?
To send notifications to Slack you need to follow 2 steps:
Step 1
Create Slack bot
Step 2
Get chat ID (channel, group or user)
How to create Slack bot?
1 Create the app
Go to https://api.slack.com/apps
Choose "create an app" → "create an app from scratch"
2 Configure OAuth & Permissions
Go to "OAuth & Permissions" tab

3 Add bot scopes
Add to bot scopes:
im:write
chat:write
-
channels:history
-
channels:join

4 Install to workspace
Click "Install to {YOUR_WORKSPACE}" and complete steps

How to get chat ID?
You can send messages to:
- Public channel
- Private channel
- Group
- Direct messages
-
For sending messages to private channel bot should be added via
@invite
command - For sending messages to group, group should be created with bot initially
1 Get channel or group ID
Navigate to chat and take ID from URL
💡 Tip: ID usually starts from
"C"
letter

2 Get user ID
Go to "Profile" and click "copy link to profile"

Then extract end part of URL, this is your user ID

🎉 Setup Complete!
Copy both token and ID to Postgresus, notification should appear and you're ready to receive backup notifications in Slack!
