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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,866)