With growing list of Office 365 services and features, it’s becoming more and more important (and equally difficult) to ensure users not only remain interested in those changes but are also up-to-date.
In many organizations, MS Teams has been received fairly well. Wouldn’t it be interesting to broadcast some small tips and tricks directly over Teams chat than bugging users with frequent emails, which they tend to ignore?
What are we looking for
Essentially, what are we looking for is a Teams App in which Administrators can prepare the message(s) to be sent over chat to other users. So, they prepare a nice message combining some text, images, links etc., select an Audience and on a press of a button, all those users will receive the message in their Teams Chat window!
Solutions
While exploring the possible ways to achieve this, I came across the option of using Adaptive cards which not only look nicer and easily adapts to various screen sizes, but also can include certain actions, like redirecting to a web page or calling a REST API on click of a button! But that’s a topic for another day.
For now, we need a way to find out how we can deliver such card(s) to users over Teams Chats. When I looked around the APIs, I found that there is NO way currently so initiate a conversation proactively directly using a normal user account! We can only achieve this using a BOT in between.
Custom Development
When you start exploring about this topic, you will surely come across this article about Sending proactive messages in teams. It provides a fair overview and a good starting point.
I am not going in detail about how to go about the custom development of the BOT, but in a nutshell, you will need these steps
- Develop a BOT which receives the personal chat’s unique conversation ID based on unique user ID and tenant ID when users install the BOT (or get installed by using Teams Apps Policies)
- Use that personal chat’s unique conversation ID to initiate proactive messages with the user(s)
- Develop another interface to create the message (Adaptive card) to be sent by the BOT. So, you create an Adaptive card using this interface, store it somewhere (like SP list/Azure storage) and your BOT reads from there and sends it to user(s)
This is super minimalistics view of what all is involved in getting that done. Start with this approach only if you have a requirement which cannot be achieved with the alternatives described next.
MS Flow
When exploring, this came up quickly. In Flow, we now have an action (in preview, currently) – “Post your own adaptive card as the Flow bot to a user”.
All we need to do is to provide an adaptive card in JSON format, a summary tip and if that should appear as banner and the recipient.
This action doesn’t support sending this card to multiple users at once, but you can always add a loop on top and iterate for each user
You can design an Adaptive card quickly using any of these online tools and copy the JSON to use in the Flow
Sending the adaptive card JSON through Flow will look something like like this
Even though, it’s super easy option to get started, as highlighted above, there are a couple of things to be aware of
- The sender will appear as Flow BOT. There is no way to change it to any other name.
- At the bottom of the message, it will show the account used to connect to MS Teams action like “xxx@tenant used Microsoft Flow to automate this notification”. And here also, there is no way to remove this message currently. Not very end user friendly!
But if these two issues don’t bother you and your intended recipients, this would be the way to go. As, it’s fastest to get started and comes with almost no additional cost.
Company Communicator
If you keep looking, you will come across this github project “Company Communicator App“. It contains most of the functionalities, we need to get started.
- It has an Author App, using which you can create messages in a predefined format – A header, Image, some text and a button. Only header is mandatory.
- This app can also send messages to individual Teams as Teams chat or to members of selected team.
- It also has an end user app, which needs to be installed for each user in order for them to receive the messages. The article mentions, this can be done using graph API, you can get it installed for all intended users using Teams App setup policies.
- You can easily change the App name by changing the Manifest file before deployment and even change the name of the BOT (Sender of the message for end users) by updating the setting of Azure BOT.
The article contains a detailed enough deployment steps along with an ARM template which helps in creating required Azure resources to get you started.
The current version comes with some limitations like you can’t provide your own Adaptive card format and a limit of max 8000 messages at once, along with some others.
But since it’s a github project, you get access to entire source code, so you can use this as starting point, if you want to build something more complex and feature rich.
Since, it uses Azure resources, using this app comes with additional cost. There is also a cost estimate in the article.
Conclusion
This was just a brief about the alternatives available to broadcast teams messages. I find the Company Communicator App a good starting point for this, and you can get started within a few hours.
Hope this helps.
Enjoy,
Anupam
2 comments
Hello Anupam, Have you tried to send Teams message to large group of users (30k or 40k + users) using Flow Bot? I have received information from Microsoft Support team that there is limit of 3000 messages, that a user can send to other users on Teams in a day. I am not sure whether this limit applies to the Flow Bot. It is not mentioned anywhere in the official documentation.
That information about 3000 messages doesn’t seem to be correct. As per the known limitation documentation – “Unless your bot is whitelisted for higher limits, the bot’s attempt at sending a message will get throttled at 8,000 messages every 30 minutes (rolling window). If you exceed this limit, you will see messages in the throttled state. If your message is throttled, the app will try to send the messages again. Therefore, enabling the eventual delivery of the messages. For example, if the app is sending 15K messages, it should take a maximum of an hour or so to deliver.”