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 Automate
Answered

Optimizing Flow

(0) ShareShare
ReportReport
Posted on by 54
Hello,
 
I have a flow which I copied over to another SharePoint site. It is very complex, but on one site it takes about 20 mins to run and another it takes 19+ hours. The first site has about 1000 entries and the next has about 2200. 

I would be fine if it took 40 mins or an hour to complete because it runs at 12am once a day when no one is waiting on it. 

What it does is go through each of the items on the SharePoint list and checks the date of the ISP column. If todays date is a certain number of days until that ISP date, it will do different things. (120,110, 100, and so on). I attached a word document with the exact specifications if you want more details. I also included a pdf with more explanation on my flow. I can send you a copy of the flow too, just let me know. 
Categories:
I have the same question (0)
  • Verified answer
    David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    I am not fully understanding your flow or your requirements, but I don't think I need to in order to offer this advice:
    1. If your flow takes 19 hours to complete, on 2,200 items, that's a problem. But I think you know this, hence your post.
    2. It appears you have multiple requirements, and you are trying to do everything in one workflow.
    3. Break your process down into the individual chunks. Everything does NOT need to go into one workflow.
    4. For example, let's start with this: If no date is entered for [Meeting Date] after 20 days (100 days prior).
      1. That indicates you need a scheduled flow that runs every day.
      2. In the Get items action, use a filter query to only return the items that meet your condition above. This alone will greatly improve the speed of your flow.
    5. Once you have just the items you need, you can then use an apply to each action:
      1. Send email to SC: The ISP meeting for [Individual Name] has not been scheduled for a [ISP Date] Implementation. Please schedule it ASAP and add the date it is scheduled to the ISP List under Meeting Date. Your supervisor is being notified.
      2. Send email to Supervisor: The following [ISP Date] ISPs have not yet been scheduled.
    6. For each of the different scenarios you outlined in the Word document, create a separate workflow for each one that only returns the items needed.
    7. With this approach, each flow should complete within few a minutes.

    I think your current flow is getting everything in the list and then using a condition to see if each item meets the condition and it's doing this multiple times for your multiple conditions. While you may only have one item that the condition applies to on any given day, it needs to go through every item to figure this out. On the other hand, by using a filter query when you get the items, if there is only one item that meets the criteria that day, then only one item is processed instead of 2,000.

    If you are not familiar with filter queries in the get items action, take a look at this Power Automate Get Items Filter Query Date [With Examples] - Enjoy SharePoint

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard