cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Deleting a file if an approval is rejected

I have an approval flow set up, a file is uploaded and a manager reviews it. if they reject it I want the user who's uploaded it to be notified and have the file deleted.

 

I'm getting as far as receiving the rejection email but the file isn't being deleted? This what I'm getting:

screengrab.png


and this is how I've set up the Delete file action below. Where am I going wrong?

deletefile.png

1 ACCEPTED SOLUTION

Accepted Solutions
RobElliott
Super User
Super User

Hi @Anonymous, after the trigger add a Get file properties action and add the ID. Then after you've sent the email delete the file by selecting the identifier from the Get file properties section of the dynamic content. PS. I don't have any Run after or anything like that set, it's just as you see it below.

0-Trigger-Get.png

 

1-Email-Delete.png

The file will then be deleted.

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

View solution in original post

4 REPLIES 4
ScottShearer
Super User III
Super User III

@Anonymous 

It looks like the actions are skipped and I suspect that there is something wrong with your condition.  Can you post a screen shot of the condition in edit mode?

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
RobElliott
Super User
Super User

Hi @Anonymous, after the trigger add a Get file properties action and add the ID. Then after you've sent the email delete the file by selecting the identifier from the Get file properties section of the dynamic content. PS. I don't have any Run after or anything like that set, it's just as you see it below.

0-Trigger-Get.png

 

1-Email-Delete.png

The file will then be deleted.

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

View solution in original post

Have you checked the "Configure run after" settings on the "Delete file" step? To access this, click the 3 dots in the corner and select "Configure run after".

 

Power Automate - Configure run afterPower Automate - Configure run after

Anonymous
Not applicable

That worked but now I'm getting another issue with all responses coming through as rejected, so I'll post another question about that.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,952)