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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow to detect when Sh...
Power Automate
Unanswered

Flow to detect when Sharepoint upload originates from Teams

(0) ShareShare
ReportReport
Posted on by 4

I would like to make a flow to detect if a document uploaded to a Sharepoint folder was uploaded within Teams.  Is it possible to detect the origin of the upload?

Categories:
I have the same question (0)
  • David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at

    Do you understand that when you upload a file in Teams, it is uploaded to a SharePoint document library that is associated with the team? There are a couple of exceptions, such as if the document is uploaded in a private channel, then it is uploaded to a separate SharePoint site and document library created for that channel. Otherwise, each channel in teams has a corresponding folder in a SharePoint document library where files are saved.

     

    If you are asking if a flow can detect if a file is uploaded to a Teams channel, the answer is yes. You can use the action "When a file is created (properties only)" and specify the folder that corresponds to that channel. 

     

    If you are asking if a flow can detect uploading a file to any channel, the answer is yes and no. You can use the same action I mentioned above and not specify the folder. However, if you create other folders in the document library associated with your team that are outside of one of the channels, it will detect those uploads as well. So if you wanted to exclude those, you would then need to create one flow for each of the channels and specify the folder in each flow.

  • kelseylied-wsh Profile Picture
    4 on at

    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.

  • David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at

    In that case, you can probably adapt what is outlined in this blog post to meet your needs: Get Attachments from a Teams message in Power Automate (bythedevs.com). Instead of using the trigger for selected message, you could use When a new channel message is added. You'll still need to create a flow for each of you Team's channels, but I think this would work.

  • kelseylied-wsh Profile Picture
    4 on at

    Awesome, thanks.  I will give it a try.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard