cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

Flow - get calendar events over serveral days?

I have a flow that post to teams a weekly-digest.

But i have a problem.... when someone have added an event that starts on Monday and ends on Thursday (for example).

Then i only get the start date and end daye, the day in between i dont get.....

 

My post to team looks like this:

 

[DAY] : [EVENT-TITLE]

 

The flow works great but i cant figure out how to get that day in between start and end date of an event that spans over several days.

 

Example:

If i have an event that starts on Monday. The event title is "EVENT123"

The event ends at Thursday.

 

Current flow would post this:

Monday: Event123

 

Then it ends. But i want this:

 

Monday: Event123

Thuseday: Event123

Wednsday: Event123

Thursday: Event123

 

But since an event only have an idicator on when it starts and when it ends i cant figure out how to make this work.

I also need the flow to work with events that happens on a single day.

 

 

 

 

4 REPLIES 4
Community Support
Community Support

Hi @Oskarkuus

 

You can use the dayOfYear function to get the day number from start of year to timestamp, get the start date and end date, then use sub() function to get the diff between them.

dayOfYear(triggerBody()?['Start'])
dayOfYear(triggerBody()?['End'])
sub(variables('EndTime'),variables('StartTime'))

Annotation 2019-10-30 094625.png

 

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

Dont get it. How would this solve the issue to make a post where i get a printout for each day something happens....

 

event is monday to friday

i only have start and end date as indicators to play with.

but i want an indicator so i get a post for not just the start-date or end-date

 

monday - eventname

tuseday - eventname

wednsday - eventname.

and so on....

 

 

So, building off of Lin-Tu's Flow steps -- once you get the number of days between you can initialize a "Counter" variable and then use a Do Until to add the events with addDays(Counter) then increment the variable. Kind of like below.

 

Flow Example.png

Frequent Visitor

Hey Oskarkuus,

 

Wanting to see if your Flow is working now or if you need more help.

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (93,268)