web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create Power Automate ...
Power Automate
Unanswered

Create Power Automate recurrence trigger for running FLOW 3 days before end of month

(0) ShareShare
ReportReport
Posted on by

Hi,

I am able to create a Power Automate FLOW, my challenge is setting up 

1. Recurrence Trigger to run 3 days before end of month. - I need help to set up the recurrence and the Trigger.

 

Steps tried on 3rd Nov 2023:

In recurrence I set

Interval = 1,  Frequency = Month,  Time Zone : IST,  Start time : 2023-10-03T13:00:00........... The FLOW is running automatically once it hits the given time, it is running without the trigger code which we provide in ;> 3 dots (Menu for Recurrence)> setting>Trigger Conditions.

I need help to configure the recurrence along with Trigger so it automatically calculates 3 days before end of the month.

Categories:
I have the same question (0)
  • grantjenkins Profile Picture
    11,063 Moderator on at

    I would set your Recurrence to run daily then add a Trigger Condition to check if today is 3 days away from the end of the current month. In essence, the flow will only run when it's 3 days out due to this condition. The Trigger Condition would be:

    @equals(formatDateTime(utcNow(), 'yyyy-MM-dd'), addDays(startOfMonth(addToTime(utcNow(), 1, 'Month')), -3, 'yyyy-MM-dd') )

     

    grantjenkins_0-1699005057706.png

     

    grantjenkins_1-1699005088909.png

     

    The expression used in the condition above to get the date 3 days before the end of the month is essentially getting the following month, then getting the start of that month, then subtracting 3 days from it.

  • Community Power Platform Member Profile Picture
    on at

    Hi Grantjenkins,

     

    Thank you so much for taking time to support me.

     

    What I tried is as below without adding your code, but at 16:44 it started to run even without the trigger code. 

    Sivaranjan_0-1699010287113.png

    My doubt is if I don`t mention the time in the recurrence template, then where can I set the time ? (Previously I had tried without trigger code by setting Frequency = month or week, the job runs without the trigger too).

     

    Is it possible that sometime we can jointly work over MS TEAMS ? I need the solution really urgent.

  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    You can set your recurrence trigger to run at whatever time you want as long as it runs once a day. The trigger will try to run at that time, but it will check the trigger condition first, and this is where it will only actually run if the current day is equal to 3 days before the end of the current month.

     

    If you don't put the trigger condition then it will run at that time every day. With the trigger condition it will only run if the trigger condition is true.

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    Hi Grantjenkins,

     

    Thank you again, you support is amazing, I tried multiple scenarios and it worked.

     

    How I tested:

    Today is 4th Nov which is -27 days if I calculate backwards from 1st Dec.

     

    My configuration:

    @equals(formatDateTime(utcNow(), 'yyyy-MM-dd'), addDays(startOfMonth(addToTime(utcNow(), 1, 'Month')), -27, 'yyyy-MM-dd') )

    Sivaranjan_0-1699108991025.png

     

    The above configuration worked and the FLOW is triggered. When I change the -27 to some other number it does not work. Thank you so much again.

     

    There is one more requirement in the FLOW : right now I am getting 2 different emails with each carrying an excel fil; 2 'Export To File for Paginated Reports' is connected to 'Send an email (V2)' separately.

    Sivaranjan_1-1699109210786.png

    How can I configure the 2 emails attachments to be sent in 1 email ?

  • Community Power Platform Member Profile Picture
    on at

    @grantjenkins Can you help me with another requirement:

    Scenario 1. To create a FLOW that runs only on Nov 15th in a year. (I tried adding 12 months to the recurrence but still not able to achieve it)

     

    Scenario 2. To create a FLOW for the last day of the year recurring.

     

    Thank You

    S.Sivaranjan

  • grantjenkins Profile Picture
    11,063 Moderator on at

    With both of these you would set it up the same as the previous flow where you set the Recurrence to run daily, but with different Trigger Conditions.

     

    //Run on 15 November each year
    @equals(
     formatDateTime(utcNow(), 'MM-dd'), 
     '11-15'
    )
    
    //Run on last day of each year (31 December)
    @equals(
     formatDateTime(utcNow(), 'MM-dd'), 
     '12-31'
    )

     

  • Community Power Platform Member Profile Picture
    on at

    @grantjenkins Thank you so much for the solution.

     

    I had tried the following method and it worked :

    1. no trigger settings

    2. configured as below, when the start time is reached, the FLOW is triggered successfully. When I changed the interval other than 12 the FLOW is not triggered.

    Sivaranjan_0-1703210409916.png

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @grantjenkins ,

    I do have another scenario which I am still working on: in PowerBI workspace a report filter is Year =2022, 2023, 2024. In export to file in Paginated Report, in the Parameter settings I had applied as below but the excel extract only uses 2022 or which ever year is set 1st. Requirement is to filter for whichever year is mentioned in the filter, in this case 2022, 2023, 2024. I am currently trying using variables but yet to achieve it.

     

    The year filter selection has to be dynamic instead of hardcoding to (2022, 2023, 2024).

    Sivaranjan_1-1703210961898.png

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard