cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Scheduling flow condition depending on x Thursday of the month

Hi,

 

I'm looking to build a flow which posts to Slack every Thursday with a different message depending on the week# of the month.

 

I.e:

 

Thursday 1: Message 1

Thursday 2: Message 2

etc.

 

I can get the schedule and post message to slack, however I can't find a way to have Flow determine which week of the month it is, any suggestions?

 

Thanks for any help in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution Sage
Solution Sage

Re: Scheduling flow condition depending on x Thursday of the month

Hi @rfeather89 ,

I suggest you use the dayofMonth() function to get the day of the month.

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

Then checking the return value.

If the value is during 1-7, post Message1.

If the value is during 8-14, post Message2.

If the value is during 15-21, post Message3.

If the value is during 22-28, post Message4.

If the value is during 29-31, post Message5.

Best Regards,

Community Support Team _ Zhongys

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

5 REPLIES 5
Highlighted
Super User II
Super User II

Re: Scheduling flow condition depending on x Thursday of the month

@rfeather89 

My usual caveat is: there is probably a more elegant way to do this, but this is one (easy) way to fix this.

 

So...I'm picturing a spreadsheet with the different messages, no?  Even if not, what do you think about having a spreadsheet with 3 columns:  [Date], [WeekNumber], [Message]

 

  • For the date, I just did a few Thursdays in a row and let Excel figure out the pattern for the next 100 or so rows.
  • Weeknumber is the Excel function WEEKNUM([Date])
  • And Message is your pre-programmed note.

If that works, then you could use a Get Row or something in Flow to get the corresponding row to today's date (you'd probably have to format it since I think the default is to include time, and then it won't ever match).

 

Let us know if that will suit your needs.

Good luck!

 

-Ed-

 

 

If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

 

Highlighted
Solution Sage
Solution Sage

Re: Scheduling flow condition depending on x Thursday of the month

Hi @rfeather89 ,

I suggest you use the dayofMonth() function to get the day of the month.

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

Then checking the return value.

If the value is during 1-7, post Message1.

If the value is during 8-14, post Message2.

If the value is during 15-21, post Message3.

If the value is during 22-28, post Message4.

If the value is during 29-31, post Message5.

Best Regards,

Community Support Team _ Zhongys

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
New Member

Re: Scheduling flow condition depending on x Thursday of the month

This seems to do the trick! meant a 5 conditional flow, but it works 🙂 Thank you!

Highlighted
New Member

Re: Scheduling flow condition depending on x Thursday of the month

I feel like this could work too, but I haven't had a whole lot of luck with Flow referencing Excel in sharepoint, plus it's always good to reduce dependancies where possible! Thank you 🙂

Highlighted
New Member

Re: Scheduling flow condition depending on x Thursday of the month

Here is a screenshot of how it looks, in case others come across this situation in the future....

 

 

image.png

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (6,525)