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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow to move files wit...
Power Automate
Suggested Answer

Flow to move files within Teams Channels

(1) ShareShare
ReportReport
Posted on 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
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Expiscornovus Profile Picture
    33,851 Most Valuable Professional on at
     
    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 816

#2
Valantis Profile Picture

Valantis 603

#3
Haque Profile Picture

Haque 566

Last 30 days Overall leaderboard