cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Andrew_J
Resolver I
Resolver I

Mothly Flow and Testing

Hi All,

 

I have the following list which is a month and item description.

 

Andrew_J_0-1668340041363.png

The idea is to send out an email based on the next months tasks.

 

However I need to test the flow.  I want to filter by say APR or AUG, I know I need a compose as test for the filter; but what would the expression be that I could use as part of the testing. 

 

Once the flow is working then I will use the recurrence at the start and send the next months tasks on the 10th of the month for next month.  So some help on this would be good.

 

I then plan to send out to all in SP Group which I know how to do.

 

Any help would be appreciated.

 

Regards

 

Andrew

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
SudeepGhatakNZ
Resident Rockstar
Resident Rockstar

@Andrew_J ,

 

I guess in that case, you can schedule your flow to run on 15th of each month.

Using addDays function, you can add 17 days to your variable (to account for 31 day months) to calculate the next month 

 

 

formatDateTime(addDays(utcNow(), 17), 'MM') will give you 12
formatDateTime(addDays(utcNow(), 21), 'MMM') will give you DEC

 

 

 

If my suggestion helped you, please give it a Thumbs up and mark it as a Solution so that it can benefit others in the community.

View solution in original post

4 REPLIES 4
SudeepGhatakNZ
Resident Rockstar
Resident Rockstar

You can simply use the Get Items action to achieve this.

Use the UtcNow() function to get the current month.

Use an oData filter based on this month.

SudeepGhatakNZ_0-1668378553488.png

Get items will return you an array of items that match the filter criteria.

 

 

If my suggestion helped you, please give it a Thumbs up and mark it as a Solution so that it can benefit others in the community.

@SudeepGhatakNZ 

 

Many thanks that worked and I now have the following as the start of the flow:

 

Andrew_J_0-1668433954228.png

And get the output I need for the rest of the flow

 

Andrew_J_1-1668434134208.png

 

One final question how do I get it to send Decembers tasks at say the middle of November.  I think i need to adjust the month variable to addDays() in the somewhere.

 

Regards,

 

Andrew 

 

 

Ajinder31
Continued Contributor
Continued Contributor

Hi @Andrew_J , You're correct about adding days to month variable. I think you can modify the intialize variable - Month action to intialize it as next month. For example 

formatDateTime(addDays(utcNow(), 21), 'MM')




SudeepGhatakNZ
Resident Rockstar
Resident Rockstar

@Andrew_J ,

 

I guess in that case, you can schedule your flow to run on 15th of each month.

Using addDays function, you can add 17 days to your variable (to account for 31 day months) to calculate the next month 

 

 

formatDateTime(addDays(utcNow(), 17), 'MM') will give you 12
formatDateTime(addDays(utcNow(), 21), 'MMM') will give you DEC

 

 

 

If my suggestion helped you, please give it a Thumbs up and mark it as a Solution so that it can benefit others in the community.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,717)