Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Flow that triggers on both files and folders

(0) ShareShare
ReportReport
Posted on by 2

I'm sharing a few folders with externals and I need to be able to see when new files are uploaded.

 

In order to solve this, I'm currently running a flow which triggers when a file is being created in a specific folder using "When file is created in folder"-trigger. However, sometimes these externals instead create folders within my folder and put their files there instead of in the folder which my flow covers. This means my flow doesn't trigger since it's not a file that was created, but a folder (with files placed in it). I've been trying to create a flow which covers both files and folders, so that it triggers on either one being create. This is probably and easy thing, but I havn't been able to manage.

 

Any help would be appriciated!

  • Sagebro Profile Picture
    2 on at
    reRe: Flow that triggers on both files and folders

    Hi,

     

    Thanks for the response!

     

    I am unable to do nr 1 since my library contains much more than the folder which I share with externals. I might also want to create files and folders of my own in other parts of this library, so this would make it trigger often when I don't want it to trigger. Is there any other solution to getting it to trigger on folders, except making it library-wide? 

  • sudharsan1985 Profile Picture
    1,325 on at
    Re: Flow that triggers on both files and folders

    Hi @Sagebro 

    You just need to tweek little on the configuration and some condition check before proceeding with the actual logic when the file is created.

    1. Make sure to use the trigger 'When a file is created (properties only)' and configure only the 'Site Address' and 'Library Name'. Do not configure the 'Folder' property, this means the flow will be triggered whenever a new folder or file is created in the configured library.

    2. Check for the Full Path (triggerOutputs()?['body(FullPath)'] property from the trigger action and check for the extension, if there is an extension then the created item is a file and you can continue with the logic, if it doesn't have any extension, then its a folder so you can stop the flow. 

     

    Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
    -Sudharsan K...

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1