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 / Alert when file added ...
Power Automate
Unanswered

Alert when file added to SharePoint and how many files and where

(0) ShareShare
ReportReport
Posted on by 112

So I discovered I can automate Dropbox to Sharepoint and create an alert when adding a new file. What I'm wondering is can I base that alert on say 50 files was uploaded today and these are the locations?

Categories:
I have the same question (0)
  • sebkath14 Profile Picture
    101 on at

    Hi @mvaladez - Are the files always dumped into the very same Sharepoint folder or into different folder locations?

  • mvaladez Profile Picture
    112 on at

    Hello @sebkath14 

    There are currently two folders. Within those two folders will be several different folders.

  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    Hopefully this is what you're looking for. It will run the flow daily and get all files created in the last 24 hours. If no files created during that period, then no email will be sent.

     

    See full flow below. I'll go into each of the actions.

    grantjenkins_0-1677290816396.png

     

    Recurrence is set to run daily (you can specify what time of the day you want to send the email).

    grantjenkins_1-1677290859727.png

     

    Get files (properties only) retrieves all the files created in the last 24 hours (excluding folders). Include Nested Items is set to Yes, and the Filter Query uses the following expression.

    FSObjType eq 0 and Created ge '@{addDays(utcNow(), -1)}'
    
    //Note: FSObjType eq 0 means Files not Folders. If you only wanted Folders and not Files you would use FSObjType eq 1.

    grantjenkins_2-1677291054625.png

     

    Condition checks to see if any files were created (length of the items returned). If at least one file, then it will continue to send the email within the Yes branch.

    length(outputs('Get_files_(properties_only)')?['body/value'])

    grantjenkins_3-1677291127190.png

     

    Create HTML table uses the output (value) from Get files and maps the File Name and Folder Path (you can specify whatever properties you want).

    grantjenkins_4-1677291203956.png

     

    Compose HTML style is just some CSS I've added to make the HTML table look nicer when we send it via email.

    <style>
     table {
     border-collapse: collapse;
     }
     table td,
     table th {
     border: 1px solid #ddd;
     padding: 10px;
     text-align: left;
     }
     table th {
     background-color: #1C6EA4;
     color: white;
     }
    </style>

    grantjenkins_5-1677291266791.png

     

    Send an email uses the output from Compose HTML style and Create HTML table within the Body. I've also added the following expression in the Subject to get the number of files created.

    length(outputs('Get_files_(properties_only)')?['body/value'])

    grantjenkins_6-1677291365187.png

     

    If at least one file was created in the last 24 hours, we would get an email similar to this:

    grantjenkins_7-1677291411087.png


    ----------------------------------------------------------------------
    If I've answered your question, please mark the post as Solved.
    If you like my response, please consider giving it a Thumbs Up.

  • mvaladez Profile Picture
    112 on at

    @grantjenkins it works! appreciate the long solution you did.

    Now I gotta figure out a better way to sync Dropbox to SharePoint.

  • mvaladez Profile Picture
    112 on at

    This was working fine and all of suddenly quit working as of yesterday. Just uploaded photos and did a manual test and it's not reporting any.

  • grantjenkins Profile Picture
    11,063 Moderator on at

    How many files/photos do you have in your Library?

  • mvaladez Profile Picture
    112 on at

    2,595 files, 189 folders

  • grantjenkins Profile Picture
    11,063 Moderator on at

    In your Get files can you set Top Count to 5000 and see if you get results back?

    grantjenkins_0-1678800617661.png

     

  • mvaladez Profile Picture
    112 on at

    Nope

    mvaladez_0-1678800978331.png

     

  • mvaladez Profile Picture
    112 on at

    Created a test folder with just a few files and the same issue. So something has changed which I don't know or understand.

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard