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 Apps / Moving Files into anot...
Power Apps
Answered

Moving Files into another folder in Teams Channel and revoking edit access to users

(0) ShareShare
ReportReport
Posted on by 986

Hi everyone,
Previously I had created a automated flow (that gets triggered every Monday morning) which contains all employee details (like name, email and dates of the current week excluding weekends). The employee information was retrieved from a Teams group and the excel file was shared in the Teams channel (named: Attendance), the flow looked like this:

Sidhant_02_0-1712813742964.png

(The varcounter acts like a counter to count the members, initially I am creating the excel file in my OneDrive and then in Microsoft Teams group). 
In the teams channel the files are uploaded as follows:

Sidhant_02_2-1712814546174.png

So as you can see all the files are reside here (the highlighted file is the latest one i.e. for the current week) but currently the structure looks a bit messy that is every week the user explicitly has to order the files (by clicking on Modified) so the latest file comes at top, instead I was thinking is there a way that we can move all the files except the latest one into an Archive folder and only the latest file (currently : Attendance_08_04_2024.xlsx at root level and all the other files in another folder) like:

Sidhant_02_3-1712814901000.png

 

And all the files that are in archive should not be editable to users (except Owner which incase is me). So I thought about a way like constructing a recurrence flow (automated flow) that runs on every Monday but after some time (like my first flow runs around 9:30 am so this flow can run around 10 am to avoid any issues) and then compare all the file creation date/modified date with current date if it matches then skip that file (don't move it) else move it to the sub-folder (Here its named Folder/Archive folder)
 

['LastModified'],'yyyy-MM-dd'),formatDateTime(utcnow(),'yyyy-MM-dd')

The excel file looks as follows:

Sidhant_02_4-1712815560533.png

 


And the message shown below is sent every start week of the week (i.e. Monday morning) once the file is created in Teams channel (named Attendance).

Sidhant_02_1-1712814509445.png


And once the file is moved into the Archive folder : They should not be editable to the users/members of the Teams channel (except the owner: which in this case will be me), so for this do we need to create 2 different flows one to move files into archive folder and other to  revoke permissions or can it be done in flow itself?.

If anyone has any idea about the same please do let me know, it will be helpful.
(Also I have posted another query which is related to the same use case if you guys can have a look it will help: SubQuery )

Regards,
Sidhant

Categories:
  • Verified answer
    Sidhant_02 Profile Picture
    986 on at

    Found a way to get what was needed for which had to construct a new flow which was as follows

    Sidhant_02_0-1713502504872.png
    Special thanks to @Jordan-Ryan for sharing the way to get it done.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard