Socket
Socket
Sign inDemoInstall

@reuters-graphics/teams-klaxon

Package Overview
Dependencies
Maintainers
5
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reuters-graphics/teams-klaxon

![logo](https://graphics.thomsonreuters.com/style-assets/images/logos/reuters-graphics-logo/svg/graphics-logo-color-dark.svg)


Version published
Weekly downloads
613
increased by17.88%
Maintainers
5
Weekly downloads
 
Created
Source

logo

@reuters-graphics/teams-klaxon

npm version Reuters open source software

Create and send Adaptive Cards to a Microsoft Teams channel.

Usage

Setup a Microsoft Teams incoming webhook in a channel, then install the library.

yarn add @reuters-graphics/teams-klaxon

Import and create a new TeamsKlaxon instance with your webhook URL.

import { TeamsKlaxon } from '@reuters-graphics/teams-klaxon';

// Your incoming webhook
const webhook = 'https://outlook.office.com/webhook/...';

const klaxon = new TeamsKlaxon(webhook);

Use element constructors to create your card's content...

import { Elements } from '@reuters-graphics/teams-klaxon';

const cardContent = [
  Elements.TextBox('Hello _world_!', { size: 'Large' }),
];

... or create your card content from scratch.

const cardContent = [
  {
    type: 'TextBox',
    text: 'Hello _world_!',
    size: 'Large',
  },
];

Then make and post your card.

klaxon.makeCard(cardContent);

const response = await klaxon.postCard();

response.status
// 200

Read the API docs for more info.

Constructor coverage

Element constructors cover a subset of the available Adaptive Card schema, including:

Elements
TextBlock
Image
Containers
ActionSet
Container
ColumnSet
Column
FactSet
Fact
ImageSet

FAQs

Package last updated on 18 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc