Yes, I do understand that a Teams channel is backed by a Sharepoint document library folder. I need to detect whether a document was uploaded by being put in a chat, or whether it was uploaded by somebody going to a Files interface (either tab within Teams or pulling up Sharepoint).
We have a lot of trouble with file storage right now because we have a team that uses a lot of imagery in chats. This gets put into the same folder backing a channel as "real" docs do, when somebody very intentionally uploads something. For example, we have a lot of folks wanting very general documents (project charter, etc) to live in the Project (Team) > General folder. That would be fine, except that folder is littered with unimportant nonsense from chat. There are a number of possible solutions to this problem (most involve either changing human behavior, or adding doc management/approval to somebody's workload). I would love to automate the problem away, by making a flow where:
When a file is uploaded to <folder behind a channel>,
if it was uploaded via a chat,
move to <some garbage-holding folder>.
It'll catch some false positives, but on our team, this alone would make a world of difference in document management.