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 : aGf/4opujAgGNv5zOs7Lys
Power Automate - Building Flows
Suggested answer

Flow to move files within Teams Channels

Like (1) ShareShare
ReportReport
Posted on 8 Apr 2025 23:18:30 by
Hello Everyone,
 
I'm trying to create a flow that does the following:
 
1. Run daily at 3:00 am
2. Identify all channels with a particular MS Team
3. Move all pictures (jpg) in the "Files" tab of each channel into a "Photos" folder within each Team.
 
Please note that channels will be add randomly as required so the list of channels are not static. 
 
I believe that I have achieved items 1 and 2.
 
Flow Steps for each item:
 
1. Setup a scheduled flow
2. Used the Teams "List Channels" option. When I run this it retrieves the appropriate information.
 
I'm assuming that I will need to use the SharePoint "Move File" option for item 3
 
I'm not sure how to tell the SharePoint "Move File" option to move jpg files from the "File" root directory to the "Photos" subfolder based on the list of channels retrieved form item 2
 
I also believe that I may need to add a step that creates the "Photos" subfolder if it does not exist already.
 
Any assistance would be greatly appreciated
 
 
  • Suggested answer
    Expiscornovus Profile Picture
    32,169 Most Valuable Professional on 10 Apr 2025 at 09:35:35
    Flow to move files within Teams Channels
     
    Are you only using standard channels?
     
    If that is the case normally all channel files tabs are folders in one Shared Documents library of the related SharePoint site. So, in that case it can be sufficient lookup that library and use for example a Get files (properties only) action which checks if a file is of type jpg.
     
    Additionally, you would want to check if the path contains Photos. In that case the file already has been moved.
     
    Below is an example for a Team which only uses standard channels
     
    1. Send an HTTP request v2 is used to lookup the related website of the Team
     
    2. Get Files (properties only)

    Filter Query
    (File_x0020_Type eq 'jpg')
     
    3. Filter Array to check if the Path does not contain Photos, in that case it has not been moved yet
     
    Filter Array query
    @not(contains(item()['{Path}'], 'Photos'))
     
    4. Move file Action uses

    Site Address
    outputs('Send_an_HTTP_request_V2')?['body']['value']
    File to Move
    item()['{Identifier}']
     
     
     
     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete