I am facing a use case in which a programmatically created document needs to be extended with a custom menu, also programmatically.
So my first intention was to create a container-bound trigger and add it programmatically. But when I had a look at the TriggerBuilder class, I realised that it only allows to create triggers for forms and spreadsheets, but not for docs.
Is there any way to add a trigger to a document in a programmatic way or to extend the menu in Google Docs besides having to add a script manually?