We are looking to add Triggers to XO Programmatically.
I found this question that refers to ST 2014 and how to do this: How to create Custom Trigger in SmartTarget 2014 SP1
However, I was interested to know if the options have changed in SDL Tridion Sites 9.1. I can see that there are now Powershell scripts that we can execute to create new triggers: https://docs.sdl.com/783502/672996/sdl-tridion-sites-9-1/managing-trigger-types-with-cmdlets
I'm wondering if there are any other methods. For example, lets say we created an add-on that put a button in the ribbon bar of the Tridion GUI. When this button is clicked, it would trigger some .NET code to parse a JSON file sitting on the file system and create the Triggers.
Would the .NET code need to trigger the Powershell scripts to create the triggers or is there a better option?