Edits history of script submission #373 for ' Send a message to MS Teams channel via webhook (msteams)'

  • deno
    One script reply has been approved by the moderators
    Ap­pro­ved
    import { IncomingWebhook } from "npm:[email protected]";
    
    // 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 hugo697 386 days ago

  • deno
    import { IncomingWebhook } from "npm:[email protected]";
    
    // 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 1018 days ago

  • deno
    import { IncomingWebhook } from "npm:[email protected]";
    
    // 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 1022 days ago

  • deno
    import { IncomingWebhook } from "npm:[email protected]";
    import type { Resource } from "https://deno.land/x/[email protected]/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 1098 days ago