Is There a Way to Create a Workflow Entirely Programmatically Without Using a Template?

So what we’re trying to do as much as possible is to instead create generic workflows which do different things based on the supplied parameters (think “all in one” kinda thing).

But that probably won’t work for your use case (unless the actions your users can do are fairly predefined).