npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cityssm/ms-teams-workflow-webhook

v0.1.1

Published

Sends a formatted message (i.e. Adaptive Card) to a Microsoft Teams workflow webhook

Readme

MS Teams Workflow Webhook for Node

DeepSource codecov

Sends a formatted message (i.e. Adaptive Card) to a Microsoft Teams workflow webhook.

Always be mindful of the data you send by webhook. Consider keeping the sensitive details behind a link you authenticate!

Installation

npm install @cityssm/ms-teams-workflow-webhook

Usage

Webhook URL

To send a message to a channel in Teams, you need to create a webhook URL.

The basics of creating a webhook URL are described. This package is built to work with Microsoft's "Send webhook alerts to a channel" workflow template.

Note that not all Adaptive Card elements have Typescript types recognized in this package (yet). Elements and actions are added on an as-need basis, however, they may still work.

import sendMessageToTeamsWebhook from '@cityssm/ms-teams-workflow-webhook'
import { recordToFactSet } from '@cityssm/ms-teams-workflow-webhook/helpers'

const webhookURL = 'https://x.api.powerplatform.com/powerautomate/...'

Simple Message

To display simple text content, pass a string as a Card Element. To display a simple link in the footer, pass the URL as the action.

await sendMessageToTeamsWebhook(
  webhookURL,
  'Test message',
  'https://github.com/cityssm/node-ms-teams-workflow-webhook'
)

Teams Output

Single Element, Single Action

Need to be a bit more complex? Pass a single Card Element object, and optionally a single Action object.

await sendMessageToTeamsWebhook(
  webhookURL,
  {
    type: 'TextBlock',
    text: 'Send with the @cityssm/ms-teams-workflow-webhook-package',
    weight: 'bolder'
  },
  {
    type: 'Action.OpenUrl',
    title: 'Visit on GitHub',
    url: 'https://github.com/cityssm/node-ms-teams-workflow-webhook'
  }
)

Teams Output

Complex Example

The elements and actions can also be arrays!


await sendMessageToTeamsWebhook(
  webhookURL,
  [
    {
      type: 'TextBlock',
      text: 'Built with the @cityssm/ms-teams-workflow-webhook package.',
      weight: 'bolder',
      size: 'large',
      wrap: true
    },
    {
      type: 'ColumnSet',
      columns: [
        {
          type: 'Column',
          items: [
            {
              type: 'Image',
              url: 'https://adaptivecards.io/content/cats/1.png'
            }
          ]
        },
        {
          type: 'Column',
          items: [
            {
              type: 'Image',
              url: 'https://adaptivecards.io/content/cats/1.png'
            }
          ]
        }
      ]
    },
    recordToFactSet({
      Sent: new Date().toISOString()
    })
  ],
  [
    {
      type: 'Action.OpenUrl',
      title: 'Visit on GitHub',
      url: 'https://github.com/cityssm/node-ms-teams-workflow-webhook'
    },
    {
      type: 'Action.OpenUrl',
      title: 'Visit on NPM',
      url: 'https://www.npmjs.com/package/@cityssm/ms-teams-workflow-webhook'
    }
  ]
)

Teams Output

Related Package - ms-teams-webhook

ms-teams-webhook v2.2.2 uses message cards and webhooks no longer available in Teams. Note that if the ms-teams-webhook project is updated to support Adaptive Cards and the new webhook URLs, it is a far more mature package than this one!