Category : .Net | Author : Chtiwi Malek | First posted : 11/30/2018 | Updated : 12/2/2018
Tags : slack, webhook, .net, dotnet, library
.Net and .Net Core library to push rich messages to Slack's Incoming webhook API

.Net and .Net Core library to push rich messages to Slack's Incoming webhook API

SlackWebHooks.Net is a fast, simple and lightweight (no dependencies) library to push rich messages and attachments to Slack's Incoming webhook API from .Net and .Net Core
Sending a simple text message to a slack channel :
// Replace the url with your own Slack Webhook URL
var client = new SlackClient("");

// Sending to a slack channel(s) Synchronously
bool result = client.SendMessage("Hello world " +;

// Sending to a slack channel(s) Asynchronously
var result2 = client.SendMessageAsync("Hello world Async " + Emoji.Places.airplane);
Sending a Message wirh attachments :
var client = new SlackClient("");

var msg = new Message {
    text = "Invoices recorded *today*",
    mrkdwn = true,
    username = "MyShop"

msg.attachments.Add(new MessageAttachment {
    pretext = "N° *B2018-3212*",
    pretext_mrkdwn = true,
    title = "Recorded at 14:11:02",
    text = "more details here ...",
    text_mrkdwn = false,
    color = "#11aa11"

// Eventually adding other MessageAttachments ...

  • Install this package from NuGet SlackWebHooks.Net
  • More informations on how to generate your Slack Webhook URL here
About the author :
Malek Chtiwi is the man behind
34 years old full stack developer.
Loves technology; but also likes design, photography and composing music.
Comments & Opinions :
I am the new one
Hello! This post could not be written any better! Reading through this post reminds me of my old room mate! He always kept chatting about this. I will forward this article to him. Fairly certain he will have a good read. Thank you for sharing! Wolfsburg Trøje
- by Hubert on 9/2/2019
Leave a Comment:
Name :
Email : * will not be shown
Title :
Comment :