cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
72Zib
Helper I
Helper I

Sent email when a new folder is created

Hi,

 

is there a way to send an email when a new folder is created on a SharePoint the folder name is a part of the email address,

Tha folder name is a number that can be 1 to 4 digits, for example for folder 12 email address would have format like EDU0012@edu.cbc 

 

Thanks

Z

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
eric-cheng
Solution Sage
Solution Sage

Hi @72Zib ,

 

Please refer to my post here.

 

There may be an easier way but you could use an if() expression to check the length() of the folder name.  If 1, then concat() 000, If 2, then concat() 00 etc.  Will be a pretty long expression.

 

You could also use conditions or a switch statement.

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

View solution in original post

5 REPLIES 5
eric-cheng
Solution Sage
Solution Sage

Hi @72Zib ,

 

You can use the when a file is created trigger and the IsFolder property.

 

It will return true if its a folder

 

Screenshot_20210821-224742_Chrome.jpg

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

Thanks,

 

Is there a way to convert the folder name to the format i need and use that name as email address?

 

Tha folder name is a number that can be 1 to 4 digits, for example for folder 12 email address would have format like EDU0012@edu.cbc 

 

Thanks

Hi @72Zib ,

 

Sure.

 

Use the concat() expression and replace xxxx with the name from your trigger

 

@concat('EDU',triggerOutputs()?['body/{Name}'],'@edu.cbc'

 

Screenshot_20210822-001855_Chrome.jpg

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

is there a way to make the folder name to be always 4 digits like 66 be converted to 0066?

eric-cheng
Solution Sage
Solution Sage

Hi @72Zib ,

 

Please refer to my post here.

 

There may be an easier way but you could use an if() expression to check the length() of the folder name.  If 1, then concat() 000, If 2, then concat() 00 etc.  Will be a pretty long expression.

 

You could also use conditions or a switch statement.

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,865)