I have around 30 libraries that will use the same set of 50 reusable workflows. The method I found online as described in this link would require assigning 50 workflows to 30 libraries manually one by one: that would be 1500 actions and would take ages to complete.
Even if new libraries are to be added to the SharePoint, 50 workflows would need to be assigned to the new library one by one every time.
If I could find a way to do this programmatically, it would save me a lot of hassle and time.
I am working in a SharePoint Online environment and I have used CSOM with C# quite a few times. Thanks in advance!
I found this question with a possible solution or at least a good starting point. The code does not seem to work, and the selected answer is obviously not correct, since the method is not even part of the Client Object model library. Any ideas?