Skip to main content

Notifications

Power Automate - Building Flows
Answered

Delayed trigger or pooling option

Posted on by

Hi. I have a very basic flow. When a file is changed or updated in a SharePoint folder, I trigger a dataset refresh in Power BI. The folder in question holds timestamped csv reports that are dropped in there consecutively (anywhere between 1 to 14 reports at a time). My trigger tries to launch the dataset refresh for each, resulting in an error (as only one refresh can run at a time).

 

Can I somehow pool the reports in the trigger? I was thinking a logic flow along the lines of:

 

1) Trigger: When a file is created or modified in a folder

2) check the modified time of the trigger file

3) wait 30 seconds

4) check if the modified time of the trigger file is the latest modified time in the folder

if yes                                                                             if no

5) continue to dataset refresh                                     5) stop the current flow (assuming the new file triggered a new flow already)

 

Can this be done? I was looking at "Do until" or maybe "Delay Until". I am very new to flows, please assume I need an in-detail walk through. 😔

 

Thanks,

 

JC

  • Verified answer
    krootz Profile Picture
    krootz 458 on at
    Re: Delayed trigger or pooling option

    please watch this to try: https://www.youtube.com/watch?v=fXbJeIY2CgE

    plug in your dataset id in the {}
  • Re: Delayed trigger or pooling option

    thanks for the response @krootz . How do I implement it in Flow? 

    JC_IL_0-1605772016081.png

     

  • krootz Profile Picture
    krootz 458 on at
    Re: Delayed trigger or pooling option

    @Anonymous  before the refresh dataset action, use a HTTP GET request action first, to read the last entry on the refresh history of your dataset. You can then check the status and endTime vs the time when your flow was triggered. 

     

    The idea is to ONLY run the refresh dataset action when the last refresh history status='Completed' and the last refresh endtime < starttime of your trigger.

    refresh.png

    https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getrefreshhistory

     

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

October 2024 Newsletter…

October 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #4 How to Conntact Support…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,651

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,727

Leaderboard