Extract to specified heading with Note Composer

I know this is getting a bit excessive at this point, but my plan now is to try to modify the script to have an option to create and name a new note, then use a template from a list of a few choices to populate it, and then finally to do exactly what the script currently does. Not sure it’s possible, but it sure feels like it might be.