cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Automating export of teams schedule

Hi there...

I have a Teams Schedule (Roster of Shifts) and I would like to try to automate the export of this.

When in the shifts tab there is a button at the top right to export the schedule.

You can select the from and to dates.

The output is exactly what I am looking for, but instead of manually doing it I would like to have it automatically run.

Frequency would be weekly

From date = now less 15 days

To date = now plus 30 days

The output excel sheet needs to be emailed as an attachment.

 

I have looked through the flow actions/triggers, but while I can get certain information there doesn't seem to be something which gives an output that is the same as the built in export function from the shifts screen itself.

 

Any suggestions would be appreciated.

 

Tony

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @TonyKuiperSAAS ,

 

Could you please share an example of the required table?

Could you please take a try to refer to screenshot below to create the flow:

1.png

addDays(utcNow(),-15)
addDays(utcNow(),30)

And you could create custom table with required column in the "Create HTML table" action.

 

Best regards,

Alice   

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

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

Hi @TonyKuiperSAAS ,

 

Could you please share an example of the required table?

Could you please take a try to refer to screenshot below to create the flow:

1.png

addDays(utcNow(),-15)
addDays(utcNow(),30)

And you could create custom table with required column in the "Create HTML table" action.

 

Best regards,

Alice   

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

View solution in original post

Highlighted

Hi Alice...

 

I've built the flow as per your example and I get the info I want with a few issues.

The utc add days works perfectly thanks. I cant add another step to format the table so its pretty.

 

The names as per the export schedule routine built into teams shows as id strings. I cant locate the source that the export schedule uses, unless there's a union of datasets somewhere in there.

The times are in utc and editing the json to convert from utc won't take. I've exported and reimported with "convertTimezone()" added in but the code disappears once back in the flow (located in definition.json)

 

Output in email

schedule test 1.jpg

Output needed. Does not need to be in this excel format. HTML is fine, just need readable information like below.

schedule test 3.jpg

 

Flow

schedule test 2.jpg

Appreciate the help.

 

Tony

Highlighted

Hi @TonyKuiperSAAS ,

 

Sorry for Microsoft flow couldn't achieve the requirement as the output that you provided currently and could only create the table as you attached.

 

Best regards,

Alice   

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

Highlighted

Hi I'm running into the same UTC problem, did you ever find a solution?

 

FYI, you can also pull out the user's name by parsing through the shift assigned to to the Get user profile action to get the display name.

image.png

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (8,688)