web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to auto cancel run...
Power Automate
Answered

How to auto cancel running flow after some time

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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
    Microsoft Employee 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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 632

#2
Haque Profile Picture

Haque 458

#3
Valantis Profile Picture

Valantis 357

Last 30 days Overall leaderboard