Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Flow for the first run takes 2 min but for the second run takes 12 hours. Dynamics 365, Email Problem

(0) ShareShare
ReportReport
Posted on by 7

When I run my flow it takes 2 mins to complete successfully, but then I run it again a few moments later it seems to freeze at the apply to each loop and take up to 12 hours. Yet, if I wait a day to run it, then it works fine. They only problem is that I want this to run every hour to notify sales that they need there approvals done.  I'm using these Dynamics 365 Premium modules. 

WonkyTime.PNG

Here is what it looks like when it freezes. 

Frozen circle.PNG

Here is a picture of my flow.

Flow11.PNGFlow2.PNG

TL:DR The first time a flow runs it's quick but the second time it takes a long time. 

EDIT: After some tinkering I figured out it was my email module that was causing it to hold up removing it made the flow run successfully. They only problem now is how do I send emails from an apply to each loop.

  • koZmiZm Profile Picture
    koZmiZm 12 on at
    Re: Flow for the first run takes 2 min but for the second run takes 12 hours. Dynamics 365, Email Problem

    I don't know if it's related to my (and some other people's) problem. I just found out about PAD a week ago. I used it for a few days and then it stopped working properly. I later discovered that certain steps were taking minutes to complete per each step. This is an unacceptable bug. I tried uninstalling and reinstalling and it worked good for 1 day. But today, same darn 2+ minute delays in certain steps. One user suggested I reinstall Edge as that helped someone. I may just uninstall Edge as I never really use it. Either way, MS needs to fix it. This bug makes the program worthless to me.

  • T-con Profile Picture
    T-con 7 on at
    Re: Flow for the first run takes 2 min but for the second run takes 12 hours. Dynamics 365

    I found that taking the email box off my Flow makes it work. Now the problem arises that I need to figure out why the email block was causing the problem, and how I can get some way to email via flow.

  • T-con Profile Picture
    T-con 7 on at
    Re: Flow for the first run takes 2 min but for the second run takes 12 hours. Dynamics 365

    ApplyToEachLoop.PNG

    So I changed the levels of parallelism to 50 and ran it a few times. Just for reference that red line is when I made the change. As you can see I still run into the issue where it will take 16+ hours. The weird thing is I just canceled that flow and ran it again and it worked. I'm going to make a new flow and instead of using the Dynamics 365 Module I'll use the Common Data Service Module.

    LastFewRuns2.PNG

    Also I've ran it a few times after 10:37 A.M and just like before they all get stuck on apply to each. I had one run even for an hour, before having to cancel it.

    Still all fails.PNG

  • v-bacao-msft Profile Picture
    v-bacao-msft on at
    Re: Flow for the first run takes 2 min but for the second run takes 12 hours. Dynamics 365

     

    Hi @Tanuki ,

     

    As @edgonzales  suggested, please consider using the Common Data Service connector to configure a similar Flow.

    In addition, you can set Apply to each as shown below, which can shorten the time required to execute Apply to each.

    Image reference:

    166.PNG

     

    Best Regards,

  • Ed Gonzales Profile Picture
    Ed Gonzales 4,531 on at
    Re: Flow for the first run takes 2 min but for the second run takes 12 hours. Dynamics 365

    @Tanuki 

    Hi there.  So, first thing:  Have you considered using the CDS connector vs. the D365 one?  That might help.

     

    Next, since D365 can do emails on its own, but is just missing the schedule bit, you could use a workflow that every hour would 1. Look for all of the opportunity records that would update a custom field (maybe "Reminders sent") and then D365 could have a workflow triggered off of when that field was updated.  That way, D365 is doing the heavy lifting of getting all of the opp. info internally.

     

    Check either of those and keep us posted.

    -Ed-

     

     

    If you liked this reply, please give it a thumbs up! 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.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard