Found the solution:
I need to manually create a template Task in the Management Console. This can be fetched, given a new ID and assigned to a source document. Then triggers can be created programatically and added to the Task before the task is then saved.
Edit: feels like I'm having a conversation with myself here.