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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Delete the libraries w...
Power Automate
Unanswered

Delete the libraries which are modified more than 42 days

(0) ShareShare
ReportReport
Posted on by 16

I want to perform this below task where how come we filter the output to get only libraries

  • Get all Lists/Libraries from the site (There is an action to get all lists/libraries)
  • Filter the out put to get only Libraries
  • Loop through each library and get the expired documents
  • delete these documents.

Kindly advise me.

 

@eric-cheng

 

Yelams_0-1633699100205.png

 

Categories:
I have the same question (0)
  • Yelams Profile Picture
    16 on at

    @eric-cheng
    @ScottShearer

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @Yelams  Please remove first value text from filter. 

    Hardesh15_0-1633708662772.png

    Please 'Thumbs Up' the posts that helped you and 'Mark as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • Yelams Profile Picture
    16 on at

    i have removed it.

    Still i am facing issue.

    Yelams_0-1633710626512.png

     

  • Yelams Profile Picture
    16 on at

    I created filter array and fetching the document libraries.

     

    Yelams_0-1633711051960.png

    found the below raw output.

     

    {
    "body": [
    {
    "Name": "0cce2ca3-baad-43ca-86c7-c119e8a6728a",
    "DisplayName": "Document Library 1",
    "Type": "101"
    },
    {
    "Name": "8c1bd727-a9ce-4186-8e04-71eee65e4acf",
    "DisplayName": "Document Library 2",
    "Type": "101"
    },
    {
    "Name": "997623e6-1a0e-4eb6-bbc9-a582e772eaa1",
    "DisplayName": "Documents",
    "Type": "101"
    },
    {
    "Name": "4887f97f-b673-4b63-880f-0cb66c7a6322",
    "DisplayName": "ExpireDocumentLibrary",
    "Type": "101"
    }
    ]
    }

     

    now i need to fetch all the files inside all document library.
    Kindly advise me

     

  • Yelams Profile Picture
    16 on at

    Unable to process template language expressions for action 'Condition_2' at line '1' and column '15206': 'The template language expression 'item()['body.(created)']' cannot be evaluated because property 'body.(created)' doesn't exist, available properties are '@odata.etag, ItemInternalId, ID, Modified, Editor, Editor#Claims, Created, Author, Author#Claims, OData__DisplayName, {Identifier}, {IsFolder}, {Thumbnail}, {Link}, {Name}, {FilenameWithExtension}, {Path}, {FullPath}, {IsCheckedOut}, {VersionNumber}'. Please see https://aka.ms/logicexpressions for usage details.'.

     

     

    Yelams_0-1633922557140.png

     

    Please find the screenshot and help me

    @Hardesh15 

     

  • Verified answer
    Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @Yelams  i think this is wrong- expression 'item()['body.(created)']'

    Do one thing add one compose just above condition 2 and pass created from dynamic content and then copy whole input in a notepad then remove these-{,@,} once you do that then use item(.....).

     

    Please 'Thumbs Up' the posts that helped you and 'Mark as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • Yelams Profile Picture
    16 on at
    • Get all Lists/Libraries from the site (There is an action to get all lists/libraries)
    • Filter the out put to get only Libraries
    • Loop through each library and get the expired documents
    • delete these documents.

    Yelams_0-1634045352777.png

     

    I want to use filter query  i need to get the documents  from all libraries which are expired.

     

    Kindly advise me

     

    @eric-cheng

     

     

  • Yelams Profile Picture
    16 on at

    @Hardesh15 

  • Yelams Profile Picture
    16 on at

     

    Please find the libraries of 

    Yelams_0-1634045611023.png

     

    Yelams_1-1634045712466.png

     

    Expired date is not showing in filter query how to get from all document libraries

     

     

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @Yelams  Please run your flow and share your dates format. Please make sure that date formates match.

    Please 'Thumbs Up' the posts that helped you and 'Mark as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard