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

Community site session details

Session Id :
Power Automate - Building Flows
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 ?

I have the same question (0)
  • ManishSolanki Profile Picture
    15,089 Super User 2025 Season 2 on at
    Re: Delete sharepoint recycle bin items post 7 days

    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
    Re: Delete sharepoint recycle bin items post 7 days

    @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
    Delete sharepoint recycle bin items post 7 days
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 691 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 431 Moderator

#3
developerAJ Profile Picture

developerAJ 266

Last 30 days Overall leaderboard