diff --git a/src/helpers/notifme.ts b/src/helpers/notifme.ts index ac57c2b5..186d36e0 100644 --- a/src/helpers/notifme.ts +++ b/src/helpers/notifme.ts @@ -270,4 +270,20 @@ export const sendNotification = async (message: string) => { } console.log("Finished sending Lark"); } + if (getSecret("NOTIFICATION_TEAMS")) { + console.log("Sending Microsoft Teams"); + try { + await axios.post(`${getSecret("NOTIFICATION_TEAMS_WEBHOOK_URL")}`, { + "@context": "https://schema.org/extensions", + "@type": "MessageCard", + themeColor: "0072C6", + text: message, + summary: message + }); + console.log("Success Microsoft Teams"); + } catch (error) { + console.log("Got an error", error); + } + console.log("Finished sending Microsoft Teams"); + } };