I created a flow bot that would send message to specific users. But the problem is it's taking a while before the bot finish running (less than 1 hour - depends how many users).
Is it possible to use user id or display name in the recipient field instead of the emails address?
I'm using the post a message as the flow bot to a user.
One reason it's taking a while is because the bot would need to search for the user's email address using their user id using Office 365's search user. After getting their email address the bot would now use all those email address and set them as the recipients in the recipient field. Is there other way where the bot could directly use the user id or display name as the recipient so that the bot wouldn't need to search each user's email address?
Don't think there is I am afraid, this is a preview feature.
Where does your list of users come from? Could you obtain the email at the source?
Alternatively have you looked at simplifying your flow? For instance, the search users routine can limit to return 1 row item (advanced top 1), you could prevent the use of unnecessary apply to each loops where only one result is called by constructing a dynamic call to a filed in an array which you know only has one record e.g. outputs(‘Compose’)?[‘values’]?['Name'].
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
P.S. take a look at my new blog here
The message has to be posted using the email address (user principle name) of the user. But searching for the user's email address if you have their display name shouldn't take the flow an hour. I don't see any way to speed this up. The problem is really that messages in Teams are designed to be sent either to the entire team or an individual. So sending a message to multiple individuals is going to be a time consuming process. There is really no way around this.
First of all thank you for your response, I really appreciate it!
The list of users came from a Power Bi dashboard. I could get the email from the source but the problem is not all of the email can be extracted, meaning my only option is to stick with the user id.
I've tried using the advanced top 1 from Office 365's search users. And I'm getting outputs I don't necessarily need (ex. ID, City, Company name, etc.) is it possible to only get the user's UserPrincipleName?
If so, how and what would be the syntax for that?
I've been sending message/reminders for almost 700 users. And I'm getting an error from Teams' post a message as a flow bot to a user ("message": Out of call volume quota. Quota will be replenished in 00:35:48)
How can I avoid that error?
Thanks for answering!
What's missing from the email? You could always use concat() to stick it back together.
For hitting the limit, maybe you could have a delay after you hit a self imposed limit? But it means not all users will get alerted in the same hour.
The Teams connector isn't designed to handle that volume of individual messages. So there is a limit on how many messages can be posted in a specific period. As I said, its designed for posting a message to an entire team or to an individual user. You are using it to post messages to groups of users. Its not designed to work that way. The only way to avoid the error you are getting is to not send a lot of duplicate individual messages to a list of users. Send the message to the entire Team instead. That's only one message instead of 700.
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.