Add menu items dynamically

This is feedback from my users that since there are a few ambiguous commands in my plugin a few actions can get confusing.

I’d like to make my menu items more specific to update the menu labels and possibly add more menus dynamically.

My menu is something like:

  • Send selected node via email

I’d like to make it more specific:

  • Email “Artboard 1 Group 2” to “Alvin”

Or if a user selects a group on the artboard I could add sub menu items :

Email menu > Group > Text 1
                   > Image 2
                   > Background Rectangle