cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AJ132
New Member

Cancel a flow when trigger has been deleted

I am new to MS Flow and I have flow that I could use some help on. I have a basic flow that uses the When an Item is Created trigger linked to a SharePoint List. The flow has a Delay Until action that will wait until a specific date and time has been reached based on a field set in the list item. Once the specified date and time has been reached it then has the Create file action that creates a text file in a SharePoint document library folder. I am using this flow to create trigger files that are used by an external process.

 

The flow is working as expected. However, the issue I have is if the SharePoint list item that triggered the flow is deleted before the Delay Until has been reached, it does not cancel the flow. The flow still goes ahead and creates the trigger file. Is there anyway to have a flow be canceled if the originating trigger item has been deleted? I looked for a condition that would check if the item has been deleted after the Delay Until has been reached, but I can’t find any such condition. I would really appreciate any helpful suggestions on how to cancel a flow if the original trigger has been deleted? The only option I can think of is to prevent items from the list from being deleted and just have a field that can be set to 'Cancelled' and have the Flow check the value in this field before creating the text file. However, that is going to lead to a pretty messy list over time. I would welcome any better suggestions.

 

Thanks for the guidance.

 

AJ

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuazh-msft
Community Support
Community Support

Hi @AJ132

 

There is no any way to have a flow be canceled if the originating trigger item has been deleted in microsoft flow currently.

 

If you if would like to add a condition after the "Delay Until" action to check if the item is exists,

you could refer to screenshot below to create the flow:

Capture.PNG

Capture.PNG

 

 

Best regards,

Alice

View solution in original post

3 REPLIES 3
v-yuazh-msft
Community Support
Community Support

Hi @AJ132

 

There is no any way to have a flow be canceled if the originating trigger item has been deleted in microsoft flow currently.

 

If you if would like to add a condition after the "Delay Until" action to check if the item is exists,

you could refer to screenshot below to create the flow:

Capture.PNG

Capture.PNG

 

 

Best regards,

Alice

View solution in original post

GabrielStJohn
Community Champion
Community Champion

Hello, @AJ132!

Thank you for posting on the Flow Community Forum! Have you had an opportunity to apply @v-yuazh-msft‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!

Thank you for being an active member of the Flow Community!

-Gabriel
Flow Community Manager

- Gabriel
Community Manager
Power Automate | Power Virtual Agents
Super User Program Manager




Hello,

When i tried these steps, i missed two points here. One is, what is the value we need to select for "Delay Until". 2nd is, I am unable to get the "True" as a value to for "Set Variable" step. Can you please elaborate on these?

Thanks,

Santosh

@v-yuazh-msft wrote:

Hi @AJ132

 

There is no any way to have a flow be canceled if the originating trigger item has been deleted in microsoft flow currently.

 

If you if would like to add a condition after the "Delay Until" action to check if the item is exists,

you could refer to screenshot below to create the flow:

Capture.PNG

Capture.PNG

 

 

Best regards,

Alice


Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,226)