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 / Avoid deactivation of ...
Power Automate
Unanswered

Avoid deactivation of unused flows

(0) ShareShare
ReportReport
Posted on by 15

Hi,
in our company there are some teams with regulary changing members.
To keep the overview and for documentation for the boss, I have created two flows for each team:
1. new member joined the team
2. member has left the team


These flows then post a short message for info in a private channel that only the boss and I (site admin) can see.

NeuesMitglied.png

There are 22 teams in total - so 44 almost identical flows for that.
A bit inelegant - but works great.

 

But if a flow has not been executed / triggered for 90 days because no new member has joined or left the corresponding team, I get the mail that the flow will be deactivated in 30 days.

DisableFlow.png

 

You could set the expiration limits up, but our central company IT does not want to do that for me.

I am now looking for a solution how to regularly trigger all flows once without sending a message to the privat channel.

One idea would be to add a dummy user to all teams once a month and remove it a little later.
However, I would like to avoid dummy users.

 

I was hoping if I cyclically have all flows deactivated and reactivated once a month by another Flow, that the 90-day-timer would start counting again - unfortunately that is not the case.

 

Unfortunately it is not possible to build a second trigger into each flow, which only triggers the flow and lets it run "empty

 

Does anyone have a clever idea how I can elegantly work around this problem?

 

Categories:
I have the same question (2)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @MarHar 

     

    You can try setting up a flow: 

    1. Runs on a schedule every 30 days

    2. Use the power automate management connector and search for the Turn Off flow action. Provide the environment name and the select the flow from the dropdown. 

    3. Add a delay of 2 minutes

    4. Using the power automate management connector, now search for the Turn On Flow action. Provide the environment name and select the flow as in step 2 from the dropdown. 

     

    The above flow will turn off the flow and turn it on every 30 days and so you will not have a problem with the flow turning off in 90 days if it was not run. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • MarHar Profile Picture
    15 on at

    Hi @yashag2255 

     

    That is exactly what I meant by this:

    I was hoping if I cyclically have all flows deactivated and reactivated once a month by another Flow, that the 90-day-timer would start counting again - unfortunately that is not the case.

     

    the only difference is that there is no 2minutes timer between off and on in my script.

    But by the time the last flow is finished, about 40s have passed before the flow starts activating one flow after the next again.

    Unfortunately, this does not work - the countdown of the last execution continues 😞

    2023-04-08.png

  • MarHar Profile Picture
    15 on at

    I tried the whole thing again last night and waited 15 minutes between deactivating and activating the flows.

    Today the next mail came that a flow has not been executed for 90 days.
    (Currently the 90 days are running out for many flows).

     

    So, unfortunately, deactivating and reactivating the flows does definitely not reset the 90-day timer. Too bad.

    Any other ideas?

  • Verified answer
    MarHar Profile Picture
    15 on at

    Unfortunately, there seems to be no way to prevent the deactivation -> so I have now solved it that way that I simply reactivate the flows automatically as soon as they have been deactivated and report this to me by mail:

    2023-04-09.png

     

    I have the annoying "will be deactivated in 30 days" and "has been deactivated" emails filtered into their own folder via Outlook rule, so I don't notice about them.
    Likewise the control-mails that the floy "xyz" has been reactivated (generated by the flow itself).

     

    I intentionally trigger this reactivation-flow whenever an email from "PowerAutomateNoReply@microsoft.com" arrives (not filtered by subject or anything else). This guarantees that the flow will start once without doing anything even when the warning "will be deactivated in 30 days" arrives.
    This avoids that the reactivation flow itself is inactive for too long.

     

    It's a pity that the solution has to be so cumbersome - MS probably still has room for improvement here.


    Edit:

    Automatically deactivated flows get the status "Suspended" (not "Stopped") -> therefore here the correct array-filter-expression:

    @And(or(equals(item()?['properties/state'], 'Stopped'), equals(item()?['properties/state'], 'Suspended')), contains(item()?['properties/displayName'], 'D-'), contains(item()?['properties/displayName'], 'Mitglied'))

     

     

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard