Skip to content

Instantly share code, notes, and snippets.

@chrisbennell
chrisbennell / SlackClient.cs
Created July 7, 2016 15:42 — forked from jogleasonjr/SlackClient.cs
A simple C# class to post messages to a Slack channel. You must have the Incoming WebHooks Integration enabled. This class uses the Newtonsoft Json.NET serializer available via NuGet. Scroll down for an example test method and a LinqPad snippet. Enjoy!
using Newtonsoft.Json;
using System;
using System.Collections.Specialized;
using System.Net;
using System.Text;
//A simple C# class to post messages to a Slack channel
//Note: This class uses the Newtonsoft Json.NET serializer available via NuGet
public class SlackClient
{
// Insert current date in Google Spreadsheet
function onOpen() {
var ui = SpreadsheetApp.getUi();
// Or FormApp or SpreadsheetApp.
ui.createMenu('Date')
.addItem('Insert Date', 'insertDate')
.addToUi();
}
function insertDate() {