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 / Send a message when a ...
Power Automate
Unanswered

Send a message when a file is created - limit to last file?

(0) ShareShare
ReportReport
Posted on by 75
There is a template flow which sends an email each time a file has been modified created in SharePoint.

I modified that template to send messages as the flow not in teams instead.

The problem is when multiple files are uploaded at once (by the same person) multiple messages
are being sent, is there a way to limit the amount of messages sent or use control logic to limit notification to the last file uploaded?

I also want to share a link to the file(s) meaning for multiple files the link should point to the parent folder instead. Is this possible?
Categories:
I have the same question (0)
  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at

    Hi @Jsharkey 

     

    "when a file is created" Action trigger for each file, i would suggest you to use Schedule Flow and run it for every 30 min(You can change the running schedule as per your need).

    In this you get all items from SharePoint and group files by created by and send one email.

    Because schedule flow will look entire library you need to add one extra column in library called "EmailSent" (Yes/No) keep this default as NO and after sent email set it to YES. 

    Let me know if you need further assistance.

     

    -------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

     

     

     

     

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Jsharkey 

     

    Your current trigger is when a file is created. So if the same user uploads 3 documents Flow is going to trigger 3 times. 

     

    What you need is once the notification is sent you need to store this information somewhere either adding a new column in SharePoint or a new list. Set the flag after notification. Before send notification filter the list against the user and flag set to Yes. Look the time difference against current time (utcNow() Vs LastModified (SharePoint)). If its less than 5 or 10 minutes then you don't need to send another notification. 

     

    Yes it can be get done but then again the above solution is not going to be perfect mainly because of the trigger. You can also think about changing the current trigger to a scheduled run.

     

    Thanks

     

     

  • Jsharkey Profile Picture
    75 on at

    I am sending messages in Teams not email. I would like to run this flow immediately after the file has been uploaded. A scheduled flow doesn't quite achieve what I want.

     

    When you say update a flag in a table or list, are you referring to using a database? What is the underlying data source here?

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi,

     

    You could add a new column in SharePoint. As soon as you send one email update this flag. Before you send email always check this flag is already set or not. The challenge here is when user uploads three files then immediately three flow work process will the triggered. There will be a timing issue between update and check whether flag is already set to yes. 

     

    If you trigger from a scheduled trigger it would be better and there won't be any timing issues between triggers, checks and update flag.

     

    Thanks

  • Jsharkey Profile Picture
    75 on at

    I am considering the following approach

    Instead of sharing the link to the file I will just share a link to the parent folder. I will limit the flow to 1 concurrent run per user. Each run will result in one folder link and the flow should not run afterwards for any other files. Will this work?

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard