Today at work we switched away from Telegram to using MS Teams for our company messenger.
Since we we’re already paying for it it made sense to plus it offers a lot more than just a messenger such as custom wiki functionality.
One of the things we were making use of was telegram bots for our applications to sent us updates on key events of interest.
However whilst I’d found documentation that said that sending messages to MS Teams was possible there didn’t seem to be a notification channel for laravel.
So I went about building a basic one today:
There were other packages for MS Teams that already existed like:
but I really wanted to leverage Laravel’s notification mechanism so that i could switch out the Telegram driver with this new one and be up and running.
The github page has a lot more detail but after installing the package with composer and doing some minimal configuration I was able to switch all of our notifications away from telegram in a matter of minutes.
The code above produced the following notification in one of our team rooms.
I know we’ll be making use of this in a lot of our projects at work, hopefully this will help someone else out too!