Slack
Examples of integrating Slack with PowerShell Universal.
Last updated
Examples of integrating Slack with PowerShell Universal.
Last updated
This example uses Universal API.
This example uses a custom Slack webhook to send a message from a Universal API.
You can invoke this API by calling Invoke-RestMethod
The following message will show up in Slack.
This following example uses Universal Automation. This example requires a license.
This example takes advantage of triggers to send a message to Slack when a job fails within PowerShell Universal. We define two scripts. The first script simply throws and error and is set to fail by using the -ErrorAction Stop
setting. The second script receives the job that failed and sends a message to the team's Slack channel.
When the failing script is running, it will report failure in the UI.
Due to the failure, the trigger will execute and send a message to Slack.