import { IncomingWebhook } from "npm:ms-teams-webhook@2.0.2";
// See below for an example card you can pass in
type MsTeamsWebhook = {
webhook_url: string;
};
export async function main(
ms_teams_webhook: MsTeamsWebhook,
messageCard: object,
) {
const webhook = new IncomingWebhook(ms_teams_webhook.webhook_url);
const ret = await webhook.send(messageCard);
return ret;
}
const example_card = {
"@type": "MessageCard",
"@context": "https://schema.org/extensions",
summary: "This is a test summary",
themeColor: "0078D7",
title: "This is a test title",
sections: [
{
activityTitle: "Windmill Webhook",
activitySubtitle: "2023-05-25 17:57:55",
activityImage:
"https://connectorsdemo.azurewebsites.net/images/MSC12_Oscar_002.jpg",
text: "This is a test text",
},
],
};
Submitted by admin 279 days ago
import { IncomingWebhook } from "npm:ms-teams-webhook@2.0.2";
// See below for an example card you can pass in
type MsTeamsWebhook = {
webhook_url: string;
};
export async function main(
ms_teams_webhook: MsTeamsWebhook,
messageCard: object,
) {
const webhook = new IncomingWebhook(ms_teams_webhook.webhook_url);
const ret = await webhook.send(messageCard);
return ret;
}
const example_card = {
"@type": "MessageCard",
"@context": "https://schema.org/extensions",
"summary": "This is a test summary",
"themeColor": "0078D7",
"title": "This is a test title",
"sections": [
{
"activityTitle": "Windmill Webhook",
"activitySubtitle": "2023-05-25 17:57:55",
"activityImage":
"https://connectorsdemo.azurewebsites.net/images/MSC12_Oscar_002.jpg",
"text": "This is a test text",
},
],
};
Submitted by admin 282 days ago
import { IncomingWebhook } from "npm:ms-teams-webhook@2.0.2";
import type { Resource } from "https://deno.land/x/windmill@v1.104.2/mod.ts";
// See below for an example card you can pass in
export async function main(
ms_teams_webhook: Resource<"ms_teams_webhook">,
messageCard: object,
) {
const webhook = new IncomingWebhook(ms_teams_webhook.webhook_url);
const ret = await webhook.send(messageCard);
return ret;
}
const example_card = {
"@type": "MessageCard",
"@context": "https://schema.org/extensions",
"summary": "This is a test summary",
"themeColor": "0078D7",
"title": "This is a test title",
"sections": [
{
"activityTitle": "Windmill Webhook",
"activitySubtitle": "2023-05-25 17:57:55",
"activityImage":
"https://connectorsdemo.azurewebsites.net/images/MSC12_Oscar_002.jpg",
"text": "This is a test text",
},
],
};
Submitted by marco lussetti774 359 days ago