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"

After bot creation:

2 Configure OAuth & Permissions

Go to "OAuth & Permissions" tab

Step 1

3 Add bot scopes

Add to bot scopes:

  • im:write
  • chat:write
  • channels:history
  • channels:join
Step 1

4 Install to workspace

Click "Install to {YOUR_WORKSPACE}" and complete steps

Step 1

How to get chat ID?

You can send messages to:

  • Public channel
  • Private channel
  • Group
  • Direct messages
⚠️ Warning
  • 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

Step 1

2 Get user ID

Go to "Profile" and click "copy link to profile"

Step 1

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

Step 1

🎉 Setup Complete!

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

Step 1