cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
buro2020
Helper II
Helper II

create a flow that will only send an email on a new folder (library item) based on two conditions - cannot seem to get this to work, need help

Hi all,

 

I have a sharepoint flow which I created to do the following:

 

send an email to everyone when a new folder is created in sharepoint. To stop lots of emails going out with a link to every file uploaded to this folder, I put a condition in the workflow to only send an email if the file extension name does not contain the decimal point... this stopping hundreds of individual emails going out each with one link to one file.

 

But then I realised that some of the folders have sub folders and then I am back to square 1 with lots of emails going out with one email with link to the new folder and 10 individual emails going out each with their own sub folder link.

 

So I used another condition to tell it to not send an email out if the item in the library has a decimal point in the extension name and also if the new item which should be a folder starts with '20' (the year, as the date is backwards).

 

unfortunately this doesn't work and doesn't send an email out at all.

 

Capture.JPG

 

any suggestions on how to get this to work?

 

Wayne

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @buro2020 ,

 

If you want to send team post if the folder name begin with '20', you could add another Condition to check it.

1.png

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
DeepakS
Resident Rockstar
Resident Rockstar

Hi @buro2020 

 

When a file or folder created in Document Library you can check it by "IsFolder" Property. for files it will false and for Folder it will be true.

So use triggerBody()?['{IsFolder}'] property in your condition.

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

 

v-alzhan-msft
Community Support
Community Support

Hi @buro2020 ,

 

As @DeepakS  said, you could check if the created item is a folder, the screenshot of the flow could as below:

1.png

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you.

 

Would this solve the problem with it only sending a teams post if the folder name begins with the numbers '20' ?

 

I am trying it now, I do have a delay on sending the post to teams - just to make sure sharepoint syncs everything in the folder; especially ones with large files.

 

wayne

Hi @buro2020 ,

 

If you want to send team post if the folder name begin with '20', you could add another Condition to check it.

1.png

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,659)