How Publishing Alerts Work in Patch My PC’s Publisher
An important factor of third-party patching is staying informed as new updates publish in real-time. Our alerts feature allows you to be notified via the following methods:
- Microsoft Teams webhook notification
- Slack webhook notification
This article will cover how the SMTP Settings and Webhook Settings work within our Publisher.
Topics covered in this article:
How do Email Alerts Work in the SMTP Settings?
The Simple Mail Transfer Protocol (SMTP) has been around since 1982 and is a common method for sending emails. Our Publisher allows you to configure SMTP settings to send email alerts for publishing operations. The first step is to configure the required options for your SMTP server.
Note: The Recipients and CC Recipients value(s) must be a valid email address. You can specify multiple email-addresses and seperate the addresses with a semi-colon. e.g. [email protected];[email protected].
Once the settings are complete, you can click the Test button to see if the recipient received the test email. If you have any issues sending emails, it’s likely an SMTP configuration error, and you can review our article Troubleshooting SMTP Email Report Sending When Using Patch My PC.
Once the SMTP settings are saved, the Publisher will automatically send an email at the end of each synchronization when any updates or applications have been published.
The email will include the following details for all Published products:
- Update/Application Title (Links to release notes)
- Time of Publishing
- Size of binary
- Update Classification
- Update Severity Level
- CVE’s (Links to CVE-ID on https://cve.mitre.org/)
In the example below, you can see an email alert where both updates and applications were published to WSUS & ConfigMgr.
In the example below, you can see an email alert where both Updates and Applications were published to Intune
For products published to Intune, The email will include the following additional information
- Intune Tenant friendly name
- Intune assignments set during Publishing.
How do Alerts Work in Microsoft Teams and Slack?
Another option for Alerts is to use a Microsoft Teams Webhook or a Slack Webhook. The Teams or Slack webhook will allow the Publisher to send a message into a Teams or Slack channel either as each update or application is published in real-time or a single message at the end of the synchronization.
Note: Microsoft announced the end of support for traditional Office 365 Connectors. You can read more about this announcment and how it affects Patch My PC alerts at https://patchmypc.com/migrating-from-office-365-connectors-to-the-workflows-app
Customers are encouraged to migrate existing webhooks of the MSTeams “Message System” type to the MSTeamsWorkflow “Message System” type before December 2024. Migration of existing webhooks is covered below in the section How to Update Existing Microsoft Teams Webhooks to Support Microsoft Teams Workflows.
Note: The MSTeamsWorkflow “Message System” type is supported in Patch My PC Publisher version 2.1.27.0 or higher.
How to Create a Microsoft Teams Webhook URL
Before you can send Microsoft Teams alerts, you need to create a Microsoft Teams Workflow to obtain a valid webhook URL.
IMPORTANT
The account being used to create the Teams Workflow must be a member of the Team > Channel where you want the Patch My PC notifications to appear. The notification will include the name of the person who created the Teams Workflow. You cannot omit the name from the notification. This is by design from Microsoft.
Please follow the steps below to create an incoming webhook URL:
- Open Microsoft Teams and navigate to the Channel where you want to receive Webhook Notifications.
- Click the More Options button … and select Workflows.
- Select Post to a channel when a webhook request is received.
- Allow a moment for the template to load, it can take a minute or two.
- Click Next.
- Allow a moment for the details tab to load to verify which Team and Channel the webhook URL will be created for and click Add workflow.
- Click the copy icon to copy the webhook URL to your clipboard and click Done.
- In the Patch My PC Publisher, navigate to the Alerts tab and in Webhook Settings click Add.
- Add a Label and paste the Workflows URL obtained in Step 7 into the Webhook URL box. Configure additional settings for the alert too.
- Click Ok to save the webhook and click Test to ensure the newly configured webhook is received to the Microsoft Teams channel.
Consideration for Private Channels
In Microsoft Teams, bots, including those created via Power Automate (Flow), can interact with channels to provide automated responses, notifications, and other functions. However, posting messages as a Flow bot to a private channel presents a challenge because of permissions restrictions that exist within the Teams platform.
A private channel in Teams is a more restricted environment compared to a standard channel. Only members who are specifically added to the private channel can access it and interact within it.
To ensure the workflow can post to a private channel, you need to edit the Post As value for the Flow.
1. Navigate to https://make.powerautonmate.com
2. Find the Workflow(s) used for Teams notifications in the Private Channel and click Edit.
3. Select the step in the flow chart named Post card in a chat or channel.
4. Modify the Post As value and change it from Bot to User.
5. Click Save.
How to update existing Microsoft Teams webhooks to support Microsoft Teams Workflows
Microsoft announced that Office 365 connectors are being deprecated. You can read the full post at https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/
To prepare for this change, Patch My PC now supports the Microsoft Teams Workflows app which is Microsoft’s recommended alternative to using Office 365 connectors to generate webhook URLs to receive notifications in Microsoft Teams.
Workflows only support the “Adaptive Message Card” format. Legacy webhooks created in the Patch My PC Publisher use the “Message Card” format.
Note: Patch My PC Publisher version 2.1.27.0 or higher is required to update legacy webhooks to support Microsoft Teams Workflows.
Which webhooks should I update?
Any webhook configured with the MSTeams “Message System” (2) in the Publisher should be updated to the MSTeamsWorkflow “Message System” (1) type.
To update an existing webhook to the new format:-
- Follow the steps outlined in How to Create a Microsoft Teams Webhook URL to generate a new webhook URL for a Microsoft Teams Workflow.
- Highlight the webhook and click Edit.
- Change the Webhook Provider from Microsoft Teams (Legacy Webhook) to Microsoft Teams Workflow.
- Replace the existing Webhook URL with the one obtained by completing Step 1 above.
- Click Ok
How to Create a Slack Webhook URL
Before you can send Slack alerts, you need to create an incoming webhook:
Please follow the steps below to create an incoming webhook URL:
- On the following web page https://api.slack.com/messaging/webhooks, select Create your Slack app (note: you will need to be logged into your Slack account and, depending on your settings, you may need to be a Workspace Owner of the account)
- Select Create an App > From Scratch. Enter an app name, choose your workspace, and then select Create App
- Set Activate Incoming Webhooks to On
- Select Add New Webhook to Workspace
- Choose the channel you want to post to and then select Allow
- Copy the Webhook URL and Paste the URL into the Webhook URL in the Publisher and click the Test button
- In the Patch My PC Publisher under the Alerts tab, select Add in the Webhook Settings section
- In the Notification Webhook Configuration window, enter a Label for your webhook, set Webhook Provider to Slack and Paste the URL into the Webhook URL field. Click OK when done
- Click theTest button
- You should see the test message sent in the Slack channel you selected
Custom Options for Teams and Slack Webhooks
You can configure the webhook notifications for Teams or Slack in the Notification Webhook Configuration window. To view the Notification Webhook Configuration select Add or Edit under Webhook Settings.
When the option “Send alerts as each product is published rather than waiting until the end of the synchronization.” is enabled, the Publisher will send a message in real-time right after each update or application is published. When this option is enabled, the message will include more detailed information about each update, including:
- Update/Application Title(Links to release notes)
- Timeof Publishing
- Sizeof binary
- Update Classification
- Update Severity Level
- CVE’s(Links to CVE-ID on https://cve.mitre.org/)
Below is an example of the individual notification in Teams.
When the option “Send alerts as each product is published rather than waiting until the end of the synchronization.” is disabled, the Publisher will only send a summary of updates and applications published at the end of the synchronization. This option will only include the name of the update or application and link to the release notes. Below is an example of the Teams summary notification.
You can choose the notification level in the Notification Webhook Configuration window. The levels include receiving All, Error, or Success. This option can be helpful if you want a specific channel to only receive alerts if an update or application fails to publish.
In the Webhook Scope section you can scope the product type you want for the alerts. You can also scope out alerts by specific products with the Product Selection section.
Note: When the Summary option is enabled, notifications can be truncated if they are too long. This is due to Teams and Slack specifications. Since we can’t send long notifications to Teams or Slack, you will need to enable SMTP Settings to receive a full email report. If email reports are not enabled, you will need to fall back to the log file for more information on any error messages.