We have an Excel spreadsheet for an on-call rotator schedule. I would like to post a Teams message each Monday with the people assigned for that week.
Example spreadsheet:
Date | Team 1 | Team 2 |
---|---|---|
7/4 | X | A |
7/11 | Y | C |
7/18 | X | B |
7/25 | Z | A |
Example Teams message:
On call for week of 7/4: X and A
The struggle I am having is reading the data from Excel. I can format the spreadsheet to something that works but I don't know how to extract the team member's based on the day. Is that possible to do with Power Automate?
You could use a Filter Query with an expression and the utcNow function in the list rows action.
Below is an example of that approach.
Add a Recurrence action
a. Configure it to run every Monday
Add a List Rows action
a. Use the following value with an expression with a utcNow function for the Filter Query
Date eq '@{utcNow('MM/dd/yyyy')}'
Add a Post message in a chat or channel
a. Use the following expression with a concat function for the Message field
Concat('On call for week of ', utcNow('M/d'), ': ', first(outputs('List_rows_present_in_a_table')?['body/value'])?['Team 1'], ' and ', first(outputs('List_rows_present_in_a_table')?['body/value'])?['Team 2'])
Flow Setup - Get Rota details from Excel and post to Microsoft Teams