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’][0]?['Name'].
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien
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!
Ooooph! Impressive.
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.
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
30 | |
11 | |
10 | |
7 | |
5 |
User | Count |
---|---|
45 | |
22 | |
14 | |
13 | |
10 |