HOWTO: Connect to Slack
  • 20 Apr 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

HOWTO: Connect to Slack

  • Dark
    Light
  • PDF

Article Summary

🚧 Documentation in Progress 🚧

We're still working on finishing up the documentation for ProGet 2024 and this article is on our TODO list. It's missing screenshots and doesn't show how to use the new templates feature in ProGet 2024.

Webhooks let you connect two tools to notify users, trigger automated workflows, or audit certain events. They can alert you via Slack when new vulnerabilities are detected, a noncompliant package is discovered, and when other package-related events occur.

In this page, we show you how to connect ProGet to Slack and sample payload messages to copy/paste into your own webhook.

🔒 ProGet Enterprise Feature

ProGet Slack Notifications are not available in ProGet Basic Edition, but custom webhooks are. See License Restrictions to learn more.

Step 1: Create a Webhook in Slack

To connect to Slack, start by following this Slack tutorial to create your incoming webhook application inside Slack. Slack now recommends this as the best way to add webhooks (instead of the previously recommended third-party app called Incoming Webhooks).

SlackWebHooks.png

Once you've created your Incoming Webhook application in Slack, you can optionally change the notification colors and the app's icon.

SlackApp.png

Note that to edit the webhook again, you must go to "Your Apps" inside Slack, rather than from the channel where the webhook posts.

Step 2: Create a Webhook in ProGet

In your ProGet instance, navigate to "Manage Feed" in a feed, click the "Webhooks" tab, and click "create." Note that you can create a webhook at the feed or at global level.

Create Webhook 1

From here enter your Slack URL, and then select "Save"

Create Webhook 2

Step 3: (Optional) Test your Webhook

The payload can be tedious to configure, so you can test it by copy/pasting this sample Slack payload we created:

{"text": "*feed:* $FeedName, *package:* $PackageId, *version:* $PackageVersion, *hash:* $PackageHash, *packageType:* $FeedType, *event:* $WebhookEvent, *user:* $UserName"}

After you've saved your webhook, take the configured action in ProGet, and your Slack should receive a notification from ProGet!

SlackMessageEvolution.png

Additional Notes

You can create webhooks from the individual feed pages or by navigating to "Administration" > "Webhooks" under "Global Components" and then selecting "Create Webhook". Creating a global webhook requires selecting "(all feeds)," but for Docker feeds, you will not be able to select this due to different Docker URLs.

SlackMessageEvolution.png


Was this article helpful?

ESC

Eddy, a super-smart generative AI, opening up ways to have tailored queries and responses