cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tdirksen
Frequent Visitor

Iterate through teams channels and delete old files

Hi,

I have the following issues: I want to iterate through channels of Teams Team and delete old files in most of them. My first approach was to use an array variable, enter the channel urls and iterate through them. For each channel I would use the url to perform "Get Files" on a specific folder. But of course then I don´t get a valid list of files or an Identifier for those. 

My second approach was to use the "list channels" connector for Teams. That seemed great at first but it is difficult to retrieve the url there and then use it in get files. The dynamic content only delivers me the following:

tdirksen_0-1662365832039.png

How would you iterate through those channels and perform delete actions in the equivalent sharepoint folders? 

2 REPLIES 2
annajhaveri
Community Champion
Community Champion

@tdirksen you can get SharePoint site URL of the Team and then iterate through folders and files of that team

Refer below post to get SharePoint site URL of team, below links will give you the starting point

https://powerusers.microsoft.com/t5/Building-Flows/Find-sharepoint-URL-for-created-team/td-p/735284

Refer to below post to get Files from SharePoint site of a team

https://powerusers.microsoft.com/t5/Building-Flows/Accessing-files-within-Teams/td-p/513363

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
tdirksen
Frequent Visitor

Hello Anna,

 

thank you for your reply. I will try that. I know have a flow for every single channel (Since there aren´t too many it is still ok) but it still seems kind of cumbersome so thanks 🙂

 

Regards,

Tammo Dirksen

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 (5,212)