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

Exporting outlook calendar for the previous month

Hello guys,
I have already flow for something like that and everything works fine, but could someone help me here how to set up power automate to export my outlook calendar for the previous month please ? Right now, Im able to export only from now and to the end of the month, but not the previous one. I would like to make time scheduled flow that would trigger every 5th of the new month for example, but I’m not sure how to set this up. Sorry about english and really limited knowledge of PA. 
Thanks in advance for any help ! 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Afflixit ,

 

If the timezone is UTC+0 , please try this:

vxiaochenmsft_0-1657013509401.png

startOfMonth(subtractFromTime(utcNow(), 1, 'Month'))
subtractFromTime(startOfMonth(utcNow()),1,'Second')
 
Best Regards,
Wearsky

View solution in original post

6 REPLIES 6
manuelstgomes
Community Champion
Community Champion

Hi @Afflixit 

Can you please share your current Flow so that I can see how to help you?

Cheers
Manuel

------------------------------------------------------------------
If I have answered your question, please mark it as "Accept as Solution." It will help other members find the solution faster. If you like my response, please give it a Thumbs Up. ?
Otherwise, reply to it, and the community will do its best to help you.

Afflixit_0-1657005794035.png

Hello and thank you ! Sure thing, this is what I have. 

v-xiaochen-msft
Community Support
Community Support

Hi @Afflixit ,

 

If the timezone is UTC+0 , please try this:

vxiaochenmsft_0-1657013509401.png

startOfMonth(subtractFromTime(utcNow(), 1, 'Month'))
subtractFromTime(startOfMonth(utcNow()),1,'Second')
 
Best Regards,
Wearsky

Thanks ! Its working. I will mark this as solution but I have an additional question please. How can I find those functions ? Because I didn’t even have them in the options you know. And why did you mentioned that time zone ? I use +1 but its working anyway ? Thank you again for your help, I really appreciate it.

Afflixit
Frequent Visitor

And I will read more about this function, but this
"startOfMonth(subtractFromTime(utcNow(), 1, 'Month'))" means that every 1th of the new month it will make that export of calendar please ? 

v-xiaochen-msft
Community Support
Community Support

Hi @Afflixit ,

 

This is the flow function document.

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference

 

My flow is a scheduled flow. Please note the flow trigger.

The Flow will be triggered on the fifth day of every month and get all events of the previous month.

vxiaochenmsft_0-1657071501787.png

Besides, If you are in UTC+1 region, please try these:

Start:
subtractFromTime(startOfMonth(subtractFromTime(utcNow(), 1, 'Month')),1,'Hour')
End:
subtractFromTime(subtractFromTime(startOfMonth(utcNow()),1,'Second'),1,'Hour')
 
Best Regards,
Wearsky

Helpful resources

Announcements
Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,499)