Skip to content

Commit

Permalink
✨ Add Microsoft Teams integration
Browse files Browse the repository at this point in the history
  • Loading branch information
sercanuste committed Sep 22, 2022
1 parent c7cc537 commit 710ef81
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/helpers/notifme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
};

0 comments on commit 710ef81

Please sign in to comment.