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

Sharepoint delete rtf file when document is created

Hello eveybody !

 

There is no way to block extension file in sharepoint so I would like to create a workflow to delete all .rtf file when they are put in the document librairy by the user +  an email " document .rtf are not allowed"

Thks y !

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @Godmaster ,

 

The method provided by Brad has basically solved your problem. It is recommended to replace contains with ends with. And replace current item in Delete file with Identifier.

 

Image reference:

25.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
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
Brad_Groux
Community Champion
Community Champion

Yes, this is a fairly easy Flow and would look something like this:DeleteRTFDocumentEmailUploader.png

Please note, that I am using the condition to compare the File name with extension (red boxes) definition with "contains" rtf (green box).

Unfortunately, this extension definition is only available via the Get files (properties only) action, which creates a an Apply to each loop. Depending on the size of your Document Library, this may cause performance issues. 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

v-bacao-msft
Community Support
Community Support

Hi @Godmaster ,

 

The method provided by Brad has basically solved your problem. It is recommended to replace contains with ends with. And replace current item in Delete file with Identifier.

 

Image reference:

25.PNG

Please take a try.

 

Best Regards,

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

Oh guys you are handsome !

I will write the workflow and make some test, I go back and let you know if its good or not.

The workflow works very well 🙂
Last question, can i apply this workflow on many librairies, site or subsite ?
The worflow pointed on a single single librairy only ?

Thks you !

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (1,498)