cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ChrisStahl
Frequent Visitor

Send message to Teams channel in rotation

I have a list of Teams channels. Each time a trigger occurs (e.g. email from an individual) I want to send a message to the next Teams channel in the list so that each team rotates through handling the email/task. Has anyone seen Power Automate used in this way? Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisStahl
Frequent Visitor

Hi Alex,

Do you think it would be possible to use an excel spreadsheet stored somewhere to keep track of this information and update it on each trigger?

Now that I think about it...I'm going to give that a shot!

Edit: Created my own solution!

I now have an Excel file that acts as sort of a flat database. 

ChrisStahl_0-1614863316337.png

(Tiny edit: your data must be in a table within the spreadsheet in order to be accessible from your flow step. Learn to create a table. You can then name your table by clicking a cell within it and changing the name in the upper left of the toolbar)

I pull the current OrderNum value from the OrderNum table (I should probably rename the row or table to avoid confusion) and assign it to a variable

ChrisStahl_1-1614863592380.png

That function should read 

int(outputs('Get_Current_Value'))

I had changed the step name for readability but forgot to change the function before posting.

 


I then increment or reset the teamnum variable based on whether it is greater than or equal to the number of teams and store it back to the OrderNum table in my excel file.

ChrisStahl_2-1614863775626.png

 

My excel file now looks like

ChrisStahl_3-1614863871768.png

 

I can then use the teamnum to get the team information from the TeamList table

ChrisStahl_4-1614863959784.png


That information is used to identify the channel to post to (the channels are named after the teams) as in this solution: Getting Channel ID for channels in Teams 

View solution in original post

2 REPLIES 2
alrez
Microsoft
Microsoft

Hi,

 

The biggest issue with this is that each flow run is independent from each other, so it will be impossible to check to see which team's channel the last flow run sent to. Unless there is someway to check something in the email itself to determine where to send the message to the teams channel I'm not certain there is anyway to do this perfectly.

 

A best idea I can think of is to have a random number generated and send the teams channel the message based on the number. In you expect to have a lot of incoming emails this should average out over time but its still not perfect.

 

Regards,

 

Alex

 

-------

 

Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ChrisStahl
Frequent Visitor

Hi Alex,

Do you think it would be possible to use an excel spreadsheet stored somewhere to keep track of this information and update it on each trigger?

Now that I think about it...I'm going to give that a shot!

Edit: Created my own solution!

I now have an Excel file that acts as sort of a flat database. 

ChrisStahl_0-1614863316337.png

(Tiny edit: your data must be in a table within the spreadsheet in order to be accessible from your flow step. Learn to create a table. You can then name your table by clicking a cell within it and changing the name in the upper left of the toolbar)

I pull the current OrderNum value from the OrderNum table (I should probably rename the row or table to avoid confusion) and assign it to a variable

ChrisStahl_1-1614863592380.png

That function should read 

int(outputs('Get_Current_Value'))

I had changed the step name for readability but forgot to change the function before posting.

 


I then increment or reset the teamnum variable based on whether it is greater than or equal to the number of teams and store it back to the OrderNum table in my excel file.

ChrisStahl_2-1614863775626.png

 

My excel file now looks like

ChrisStahl_3-1614863871768.png

 

I can then use the teamnum to get the team information from the TeamList table

ChrisStahl_4-1614863959784.png


That information is used to identify the channel to post to (the channels are named after the teams) as in this solution: Getting Channel ID for channels in Teams 

View solution in original post

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (60,613)