ms-teams-adaptive-notifications
v1.0.2
Published
CLI used to send Microsoft Adaptive Cards using an Incoming Webhook.
Downloads
4
Readme
ms-teams-adaptive-notifications
CLI used to send Microsoft Adaptive Cards using an Incoming Webhook.
Overview
Microsoft provides Adaptive Cards which are an open card exchange format enabling developers to exchange UI content in a common and consistent way.
There may be times or uses cases that one would like to send a customizable message to a teams channel to notify of an event (ex: Tekton Pipeline Completion Run, Release Cut, etc...).
This NPM CLI allows users to send customizable notifications to a Microsoft Teams via an incoming webhook.
The adaptive card schema and payload to templatize card can be stored locally or fetched remotely.
This CLI leverages Microsoft's Adaptive Card Templating SDKs.
Prerequisites
Build and Design your adaptive card using Microsoft's Adaptive Card Designer
- Don't forget to export your adaptive card payload and sample data :smile:
Usage
$ npm install -g ms-teams-adaptive-notifications
$ ms-notify (-v|--version|version)
ms-teams-adaptive-notifications/1.0.0 linux-x64 node-v16.13.0
$ ms-notify --help
Send Microsoft Adaptive Cards using an Incoming Webhook.
USAGE
$ ms-notify -t <adaptive-card-template> -c <adaptive-card-content> WEBHOOKURL
ARGUMENTS
WEBHOOKURL Microsoft Teams Webhook URL
OPTIONS
-c, --content=content (required) Content to be inserted into Adaptive Card Template - [URL/FILE_PATH]
-h, --help show CLI help
-t, --template=template (required) Adaptive Card Template - [URL/FILE_PATH]
-v, --version show CLI version
Usage via Docker
# Pull Image from DockerHub
docker pull antoniordz/ms-notify@latest
# View Help Information
dock run --rm ms-notify --help
# Basic Usage
docker run --rm ms-notify -t <adaptive-card-template> -c <adaptive-card-content> WEBHOOKURL
Alternatives
- Adaptive Cards Template Service
- Tekton - Send message to Microsoft Teams Channel
- Only supports plain test message