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 / How to auto cancel run...
Power Automate
Unanswered

How to auto cancel running flow after some time

(0) ShareShare
ReportReport
Posted on by

I have a flow that is pretty simple:

 

SQL New Item -> Send Email With Options -> Update SQL Based On response

 

I also have PowerApps Apps where user can do the actions instead of doing them in the email that was sent from flow.

 

Here are my two questions:

 

1. Is there a way to kill a running flow automatically after lets say 30 days if it is still running.

2. Do you guys have creative solutions for this problem: where user can take an action via Flow (email options) or within the app (PowerApps). Is there a way to kill the flow immediately when an action is taken in PowerApps to modify the SQL instead of the flow that was running since creation of new line in SQL?

 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @Anonymous,

     

    Could you please share a screenshot of your flow's configuration?

     

    For your first question, do you want to kill a running flow automatically after 30 days if it is still running? 

     

    If you want to kill a running flow automatically after 30 days if it is still running, I think it is not necessary to add extra actions to achieve your needs, because the running flow would be timed out after 30 days. 

     

    There is a limit in Run duration of a single flow run, the max Run duration of a single flow run is 30 days. More details about the Run duration and retention limits of a single flow run, please check the following article:

    Run duration and retention limits

     

    If you want to kill a running flow after 7 days (less than 30 days), I think a Delay action and a Terminate action could achieve your needs. I have made a test on my side, please take a try with the following workaround:4.JPG

     

     

    More details about creating a Parallel branch action in flow, please check the following blog:

    https://flow.microsoft.com/en-us/blog/parallel-actions/

     

     

    For your second question, do you want to kill your flow immediately when an action is taken within your PowerApps app?

     

    If you want to kill your flow immediately when an action is taken within your PowerApps app, I afraid that there is no way to achieve your needs currently. 

     

    If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

    https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

     

     

    Best regards,

    Kris

  • Community Power Platform Member Profile Picture
    on at

    Hi @v-xida-msft

     

    Thanks for all the info!

    It is great to know that running flows are killed after 30 days automatically and thanks for showing me how to do it if I want to kill it before.

     

    As for my second question I will try to figure something out.

    I wonder is it possible to call a running flow from another flow, based on some variable (lets say SQL Primary key)?

    This way I could use SQL Modify item and it would check if there is any flows running for this particular SQL item and kill other flows.

    Maybe I should post this in Idea section 😊

     

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