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
Super User

@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.

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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (2,042)