Send notifications to Slack using Dynamics 365

Introduction: 

In the modern business landscape, every company needs some form of messaging system for their employees to communicate. Slack is one such popular communication tool. Like many other messaging platforms, Slack allows users to create channels, which are very similar to subject based chat rooms, and can be made both public and private. Additionally, Slack can also integrate with Google Docs and Dropbox which makes it an optimal solution for companies to share files amongst team members. 

Learn more about Dynamics 365!

Learn More

  1. One assumption that many make is that Slack cannot be integrated with Dynamics 365 as Microsoft provides a competing platform that provides similar functionality called Teams. Fortunately for Dynamics users, Microsoft provides another tool called Microsoft Flow that we can use to achieve this goal. In this article we will walk you through how to integrate with Slack to send updates from Dynamics into a formatted message that will be displayed in a slack channel. to inform the team of a recent opportunity or count of leads. Create a channel in Slack that will be designated for integration. 
  2. Add the Slack bot. 
  3. Within the channel, grant the necessary permissions to allow communication from Dynamics. 
  4. Upon completion of the Slack channel, navigate back to the PowerApps portal and create the flow. 
  5. Set the trigger for the flow based on the information that is needed to be communicated to the channel. The trigger can either be when a record in Dynamics 365 is created or when specific fields are modified. An example would be a status change if a monetary field is greater than a specified value. 
  6. Utilize a “Compose” step in the flow to create the message. The input for the composition is a free text field. Custom text, expressions, and references to previous steps of the flow can be inserted into the compose. 

PowerApps portal

To post the message, use the “Post Message” flow step. Specify the slack channel in the “Channel Name” field and insert the Output from the previous Compose step. If desired, additional text can be added in this field.  

slack channel

To see the output, trigger the flow in Dynamics 365 to run. Navigate to the specified channel in Slack to see the message. 

flow in Dynamics 365

Explore Dynamics 365 Sales for Enhanced Business Growth

Contact Us

Conclusion

In conclusion, having an automated message that appears on a specified channel is beneficial in keeping the team updated on important events. It allows users to navigate away from a dashboard view, reduces the constant refresh of a list view, and with the filtering for the trigger, is an optimal way to see only records that are deemed priority over others. The notification on Slack can be for any type of record and is flexible as the flow can pull data from any part of Dynamics 365.