Teams does not have a file store of its own. Every document posted in it is really sitting in SharePoint or OneDrive, and which one depends on where it was posted — which is why they are so hard to find again.
The short answer
A file posted in a Teams channel is stored in the SharePoint site behind that team, in a document library folder named after the channel. A file sent in a chat or a direct message is stored in the sender’s OneDrive, under a folder for Teams chat files, and shared with the people in that chat. Nothing is stored in Teams itself. That split is the whole problem: channel files land in a structure named after conversations rather than work, and chat files land in one person’s personal drive. A workflow watching the team’s SharePoint library reads each document and uses the Rename and Move steps to file it by project or client, in place, in the library you already have.
Steps this uses
Before and after
As they arrive
After the workflow
The same library, refiled by the project each document names instead of the channel it was posted in.
Setting it up
This is the sentence. Send it to the builder and the steps below appear on a canvas, wired and named, for you to change before anything runs.
When a file lands in the Teams channel library on SharePoint, read what the document is and which project it belongs to off it, rename it date-first, and file it under that project in the same library.
Open the Files tab in a channel and it is showing you a SharePoint folder. That folder — the team’s document library, subfoldered by channel name — is what a workflow watches. Pointing at it rather than at Teams is the step that makes everything after it ordinary storage automation.
Channels are named after conversations and are created and abandoned freely; a channel-shaped folder tree inherits every one of those decisions. The Read Details from File step reads the project or client off the document, and the Move step files it that way inside the same library.
Files sent in a chat sit in the sender’s OneDrive, which is why they vanish when that person leaves. The Messaging trigger picks them up as they are shared and the Save a Copy step puts them somewhere the team owns.
The Rename and Move steps act inside the SharePoint library the team already uses, so existing permissions, links and sync clients keep working. Nothing is copied into a parallel system that then has to be kept in step with this one.
Channel files live in the SharePoint site created with the team, inside its document library, in a folder named for the channel. Chat and direct-message files live in the OneDrive of whoever sent them, in a folder for Teams chat files, shared with the people in that conversation. Teams stores nothing itself; it is a view over those two places. Knowing this is most of the answer, because it means a Teams filing problem is a SharePoint and OneDrive filing problem, with all the tools that implies.
A file sent in a chat belongs to the sender’s OneDrive. When that person leaves and their account is removed, the files they shared in chats go with it, and the conversation is left with links that no longer resolve. This is not a bug, it is what personal storage means. It is also the strongest argument for copying anything that matters out of a chat and into storage the team owns, at the moment it is shared rather than during an offboarding.
It organizes the documents in the libraries you point it at. It does not restructure your teams, merge SharePoint sites, migrate anything between tenants, or preserve the conversations around the files — Teams message retention is a Microsoft 365 setting and stays one. The files are the part that outlives the channel, and they are what this handles.
FAQ
Files posted in a channel are stored in the SharePoint site behind that team, in its document library, in a folder named after the channel. Files sent in a chat or direct message are stored in the sender’s OneDrive, in a Teams chat files folder, and shared with the people in the chat. Teams does not store files itself.
Point a workflow at the team’s SharePoint document library, which is what the channel Files tab is showing you. It reads each document and files it by project or client inside that same library, in place, so permissions and links are unaffected and nobody has to learn a second system.
Because it is in their OneDrive, not yours, and not in any shared library. You have access through the link in the chat and nothing else. If their account is removed, that access goes with it — which is why files that matter should be copied somewhere the team owns.
No. A workflow connects to the SharePoint library directly and acts on documents there. It also reads the documents, which is the part a flow cannot do — Power Automate can act on metadata, but somebody has to put the metadata there first.
A workflow reads each document in the team’s library and files it where the work is, not where the conversation was.
5 GB free · No credit card required