Adding, editing, removing, reading SharePoint list rules programmatically

Copper Contributor

Hi, 

 

reading the documentation, I couldn't find a way to manage site list automate rules via any API (REST/graph/CSOM) or framework (PnP). Is there a way to do so?

 

The only way I managed to find at the moment is adding them to a site creation script as a sub action of the create new site verb, but that will not allow me to alter them in any way in existing sites or lists. 

 

Moreover, they're not saved at all in .stp list templates. 

 

How can I programmatically manage these automate rules in an existing list? 

 

 

Thank you

 

1 Reply
I am not sure this will be answering this question, but if you are referring to the rules built on the "classic" sharepoint I am not sure these can be changed or altered by API, etc.
I may be wrong, but if I am not mistaken, the way MS has chosen to develop is now using Power Automate to handle the future of rules/automation for Sharepoint. The existing features would continue to work, but I doubt it will be kept for a long time.
so, basically, any event that may have triggered an action on your lists could be replicated by Power Automate.
I suggest exploring this path because it would be more future-proof than legacy embedded rules.
sorry if it is not the answer that you may be looking for but that's what I feel it might be happening. Good luck