Effortless C# integration with Slack

Effortless C# integration with Slack

Good morning, this is gonna be a very short post, as it’s truly super easy to integrate the C# with the Slack API. We’ll make use of the latest .NET Core version listed as the dnxcore50 and build a console application that you can use to send the messages to the particular channel.


 

At first, let’s set up the required dependencies int the project.json file:

Ok, we’re almost finished (I’m not kidding), just create the following class:

And instantiate it within the main Program.cs:

Yeah, that’s it – just make sure that you set the valid URI of the Webhook.
Additionaly, you may switch a channel or customize the username sending the message.

As always, I’m providing the source code that can be downloaded here.

9 Comments Effortless C# integration with Slack

  1. Pingback: Effortless C# integration with Slack - How to Code .NET

  2. Pingback: Dew Drop – June 13, 2016 (#2270) | Morning Dew

  3. Pingback: Warden meets Slack | Piotr Gankiewicz

  4. Nishant

    I am not getting slack notification always. Sometime it comes instantly sometimes not.

    Could you help me to fix the issue ?

    Reply

Leave A Comment

Your email address will not be published. Required fields are marked *