cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Send one email notification when new folder is created.

I'm able to successfully create a folder based on a new file attachment and send an Email when it's created although I just want to send one Email and not an Email each time a file is sent.   The below solution allows me to create the new folder path but I'm receiving an email for each file that is uploaded to the new folder which is well over 20 files/emails.   Does anyone know how to just send one Email instead of an Email each time a file is created in that same folder?   Should I create a separate flow that points to the new folder, the new folder is created weekly?   Started creating a Recurrence weekly flow but don't know how to tie it to the other flow or how to point to the new folder that's created weekly. 

 

https://powerusers.microsoft.com/t5/Building-Flows/Send-email-notification-when-new-folder-is-folder...

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Anonymous,

 

Do you want to send one email notification when a new folder is created in your SP library?

 

The "When a new folder is created" trigger is not supported in SharePoint connector of Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

I assume that there may have some new folders are created in your SP library every day, you could consider create a separate flow to get all folders within your SP library, then check if there are some folders are created in current day. I have made a test on my side, please take a try with the following workaround:

  • Add a Recurrence trigger, Interval set to 1 and Frequency set to Day. At these hours set to 23 and At these minutes set to 59.
  • Add a "Get files (properties only)" action, specify Site Address and Library name.
  • Add a "Apply to each" action, input parameter set to output of the "Get files (properties only)" action.
  • Within "Apply to each" action, add a Condition, click "Edit in advanced mode", type the following formula:

 

@and(not(contains(items('Apply_to_each')?['{FilenameWithExtension}'], '.')),equals(formatDateTime(items('Apply_to_each')?['Created'], 'MM/dd/yyyy'), utcNow('MM/dd/yyyy')))

Within "If/yes" branch of Condition, add a "Send an email" action.

 

 

Image reference:4.JPG

 

5.JPG

The flow works successfully as below:6.JPG

 

 

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
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

5 REPLIES 5
v-xida-msft
Community Support
Community Support

Hi @Anonymous,

 

Do you want to send one email notification when a new folder is created in your SP library?

 

The "When a new folder is created" trigger is not supported in SharePoint connector of Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

I assume that there may have some new folders are created in your SP library every day, you could consider create a separate flow to get all folders within your SP library, then check if there are some folders are created in current day. I have made a test on my side, please take a try with the following workaround:

  • Add a Recurrence trigger, Interval set to 1 and Frequency set to Day. At these hours set to 23 and At these minutes set to 59.
  • Add a "Get files (properties only)" action, specify Site Address and Library name.
  • Add a "Apply to each" action, input parameter set to output of the "Get files (properties only)" action.
  • Within "Apply to each" action, add a Condition, click "Edit in advanced mode", type the following formula:

 

@and(not(contains(items('Apply_to_each')?['{FilenameWithExtension}'], '.')),equals(formatDateTime(items('Apply_to_each')?['Created'], 'MM/dd/yyyy'), utcNow('MM/dd/yyyy')))

Within "If/yes" branch of Condition, add a "Send an email" action.

 

 

Image reference:4.JPG

 

5.JPG

The flow works successfully as below:6.JPG

 

 

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
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

Anonymous
Not applicable

Yes, looking to create only one email notification when a new folder is created.  Implemented this and got this to work, just testing this to make sure all works appropriately.   

Anonymous
Not applicable

I was able to get this solution to work although it only works if the folder is created that day.   The new folder gets created over the weekend but the Email notification is sent that following Monday.  How can we send the email based on the new folder created prior to X  # of days?

 

Thought I could just add the number of days separated by comma like below but it doesn't work.   

 

@and(not(contains(items('Apply_to_each_2')?['{FilenameWithExtension}'], '.')),equals(formatDateTime(items('Apply_to_each_2')?['Created'], 'MM/dd/yyyy'), utcNow('MM/dd/yyyy',-3)))

 

Any help is appreciated..

Anonymous
Not applicable

Help!  You helped me with this Notification but I'm still stuck, the solution sends an Email only if the folder was created that day.  How can I have it send an email the day after the folder was sent?

 

Here's the condition you provided:   

@and(not(contains(items('Apply_to_each')?['{FilenameWithExtension}'], '.')),equals(formatDateTime(items('Apply_to_each')?['Created'], 'MM/dd/yyyy'), utcNow('MM/dd/yyyy')))
batvan276
Helper II
Helper II

Hello - is there any way get this working for One drive?

 

Also what condition would I use and how do I access the below ; 

 

batvan276_0-1610129850931.png

 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (31,168)