Send message to Microsoft Teams.

Send messages to teams from the command line or Go program. Go module to send messages to MS Teams channel using webhooks.

teams

Command line: Post messages to MS Teams channel from command line.

Proxy support: Works behind a proxy

Flexible: Flexible and simple interface to use in Go Programs.

Installation

go install github.com/kevincobain2000/[email protected]

From Command Line:

go-msteams -hook=<required ms-teams webhook> -title= -subtitle= -subject= -message="<h1>HTML OK</h1>

From Go program:

import (
    gmt "github.com/kevincobain2000/go-msteams"
)

func main() {
    err := gmt.Send(title, subtitle, subject, color, message, hook, proxy string)
	if err != nil {
		log.Println(err)
	} else {
		log.Println("Successfully sent!")
	}
}

Command line params:

go-msteams -h
  -color string
    	Description: Your theme color
  -hook string
    	(required) Description: MS Teams webhook URL
  -message string
    	Description: Message body. HTML allowed. (default "My Message")
  -proxy string
    	Description: Hit behind this proxy
  -subject string
    	Description: Your subject (default "My Subject")
  -subtitle string
    	Description: Your summary (default "My Summary")
  -title string
    	Description: Your title (default "My Title")

GitHub

View Github