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 / Delete sharepoint recy...
Power Automate
Unanswered

Delete sharepoint recycle bin items post 7 days

(0) ShareShare
ReportReport
Posted on by 2

Hi Everyone,

I am building flow to remove all old deleted files from recycle bin after 7 days. I have 2 environments one prod and other dev

I have created flow few months back in dev and it was working bit in prod same structure of flow is not working. I am part of site collection admin  group.

 

FLow 1.png

URI: _api/web/RecycleBin?$filter=DirName eq 'sites/SPAdmins/ZZZ'&$select=Id &$select=DeletedDate'

 

But now it is not filtering the content in recyclebin  and giving me any output. I was working earlier.

I even tried all other alternative query 

_api/web/RecycleBin

_api/web/RecycleBin?$filter=ID ge 1

_api/web/RecycleBin?$$select=Id &$select=DeletedDate'

 

Has anything changed ?

Categories:
I have the same question (0)
  • Manish Solanki Profile Picture
    15,167 Moderator on at

    Hi @JSINFO 

     

    One question, are you getting any errors in prod flow? It seems like somewhere in the flow dev URL is being used that needs to be replaced with prod URL.

     

    I would suggest you to pls check if you have replaced the dev site DirName with the prod one in the filter query:

    _api/web/RecycleBin?$filter=DirName eq 'sites/SPAdmins/ZZZ'&$select=Id &$select=DeletedDate'

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • JSINFO Profile Picture
    2 on at

    @ManishSolanki , I checked again but URL is not the issue. There are no errors or output. Can you suggest me URI query for selecting ID and deleted date. because flow is using both to verify which one has to get deleted.

  • bart_hek Profile Picture
    14 on at
    Hi there
    Was this ever solved?
    I want to do almost the same thing as you and have empty reply of the HTTP request to the SharePoint | _api/web/RecycleBin
    Appreciate your input.

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 711

#2
Vish WR Profile Picture

Vish WR 691

#3
Haque Profile Picture

Haque 525

Last 30 days Overall leaderboard