<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Slack Integration from WFA in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Slack-Integration-from-WFA/m-p/154372#M27564</link>
    <description>&lt;P&gt;Hi Frazer,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's possible in PowerShell (like &lt;A title="https://www.scriptinglibrary.com/languages/powershell/send-messages-to-slack-with-powershell/" href="https://www.scriptinglibrary.com/languages/powershell/send-messages-to-slack-with-powershell/" target="_blank" rel="noopener"&gt;this&lt;/A&gt; example) so it should be possible in WFA.&lt;/P&gt;
&lt;P&gt;I would "guess" it's something like this (though I've not tested it):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Param(
   [Parameter(Mandatory=$True, HelpMessage="The slack URI")] 
   [String]$Uri,
   [Parameter(Mandatory=$True, HelpMessage="The slack hostname, FQDN or IP address for authentication")] 
   [String]$HostName,
   [Parameter(Mandatory=$True, HelpMessage="The slack channel name")] 
   [String]$ChannelName,
   [Parameter(Mandatory=$True, HelpMessage="The slack channel message")] 
   [String]$Message,
   [Parameter(Mandatory=$True, HelpMessage="The slack channel icon")] 
   [String]$Icon
)
#'------------------------------------------------------------------------------
#'Enumerate the slack credentials from the WFA credential cache.
#'------------------------------------------------------------------------------
$Credentials = Get-WFACredentials $HostName
[String]$userName = $Credentials.GetNetworkCredential().Username
$BodyTemplate = @"
   {
      "channel": "$ChannelName",
      "username": "$userName",
      "text": "$Message. \nTime: DATETIME.",
      "icon_emoji":":$Icon:"
   }
"@
#'------------------------------------------------------------------------------
#'Send the message to the slack channel.
#'------------------------------------------------------------------------------
Try{
   Invoke-RestMethod -uri $Uri -Method Post -body $body -ContentType "application/json" -Credential $Credentials -ErrorAction Stop
   Get-WFALogger -Info -Message "Sent message ""$Message"" to slack channel ""$ChannelName"" using URI ""$Uri"""
}Catch{
   Get-WFALogger -Error -Message $("Failed invoking URI ""$Uri"". Error " + $_.Exception.Message)
   Throw "Failed sending message ""$Message"" to slack channel ""$ChannelName"" using URI ""$Uri"""
}
#'------------------------------------------------------------------------------&lt;/PRE&gt;
&lt;P&gt;In addition to the PowerShell code link, I would assume the REST POST method would require authentication hence i added the $HostName parameter which is used to retrieve a WFA credential object for invoking the REST API.&lt;/P&gt;
&lt;P&gt;EG add a WFA credential using 'hooks.slack.com' and the username (EG #wfaslackbot)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Matt&lt;/P&gt;</description>
    <pubDate>Mon, 17 Feb 2020 23:33:59 GMT</pubDate>
    <dc:creator>mbeattie</dc:creator>
    <dc:date>2020-02-17T23:33:59Z</dc:date>
    <item>
      <title>Slack Integration from WFA</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Slack-Integration-from-WFA/m-p/154368#M27563</link>
      <description>&lt;P&gt;Hi, I am looking at sending notifications from WFA into slack channels. So rather than using the current mail code I'll be looking at trying to write something to hit a slack channel.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm wondering before I begin if anyone has something written already? I have an easy enough powershell script which does that but I'm learning how to invoke these in WFA atm.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 11:19:09 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Slack-Integration-from-WFA/m-p/154368#M27563</guid>
      <dc:creator>FRAZERBRADBURN</dc:creator>
      <dc:date>2025-06-04T11:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Slack Integration from WFA</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Slack-Integration-from-WFA/m-p/154372#M27564</link>
      <description>&lt;P&gt;Hi Frazer,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's possible in PowerShell (like &lt;A title="https://www.scriptinglibrary.com/languages/powershell/send-messages-to-slack-with-powershell/" href="https://www.scriptinglibrary.com/languages/powershell/send-messages-to-slack-with-powershell/" target="_blank" rel="noopener"&gt;this&lt;/A&gt; example) so it should be possible in WFA.&lt;/P&gt;
&lt;P&gt;I would "guess" it's something like this (though I've not tested it):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Param(
   [Parameter(Mandatory=$True, HelpMessage="The slack URI")] 
   [String]$Uri,
   [Parameter(Mandatory=$True, HelpMessage="The slack hostname, FQDN or IP address for authentication")] 
   [String]$HostName,
   [Parameter(Mandatory=$True, HelpMessage="The slack channel name")] 
   [String]$ChannelName,
   [Parameter(Mandatory=$True, HelpMessage="The slack channel message")] 
   [String]$Message,
   [Parameter(Mandatory=$True, HelpMessage="The slack channel icon")] 
   [String]$Icon
)
#'------------------------------------------------------------------------------
#'Enumerate the slack credentials from the WFA credential cache.
#'------------------------------------------------------------------------------
$Credentials = Get-WFACredentials $HostName
[String]$userName = $Credentials.GetNetworkCredential().Username
$BodyTemplate = @"
   {
      "channel": "$ChannelName",
      "username": "$userName",
      "text": "$Message. \nTime: DATETIME.",
      "icon_emoji":":$Icon:"
   }
"@
#'------------------------------------------------------------------------------
#'Send the message to the slack channel.
#'------------------------------------------------------------------------------
Try{
   Invoke-RestMethod -uri $Uri -Method Post -body $body -ContentType "application/json" -Credential $Credentials -ErrorAction Stop
   Get-WFALogger -Info -Message "Sent message ""$Message"" to slack channel ""$ChannelName"" using URI ""$Uri"""
}Catch{
   Get-WFALogger -Error -Message $("Failed invoking URI ""$Uri"". Error " + $_.Exception.Message)
   Throw "Failed sending message ""$Message"" to slack channel ""$ChannelName"" using URI ""$Uri"""
}
#'------------------------------------------------------------------------------&lt;/PRE&gt;
&lt;P&gt;In addition to the PowerShell code link, I would assume the REST POST method would require authentication hence i added the $HostName parameter which is used to retrieve a WFA credential object for invoking the REST API.&lt;/P&gt;
&lt;P&gt;EG add a WFA credential using 'hooks.slack.com' and the username (EG #wfaslackbot)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 23:33:59 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Slack-Integration-from-WFA/m-p/154372#M27564</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2020-02-17T23:33:59Z</dc:date>
    </item>
  </channel>
</rss>

