Expose existance & status of menu item in a condition or API call

I'd like to implement an action that moves emails to the mailbox that Apple Mail suggests (which is usually correct) but presents a floating menu if Apple Mail does not suggest anything. The lack of a suggestion can be determined by looking at the menu (there is a deactivated menu item called "Move to predicted mailbox" under "Message"). Similar patterns (menu items changing names based on the app's status) occur in, e.g., Zoom.

It would be great if there was a way to determine if a menu item exists and if it is activated. That functionality must exist internally (to activate menu items). It could be exposed as an Advanced Condition or a Javascript API function (in which case it could be combined with the "If Java Script Returns True" Condition Action).

Thanks a lot.

I can expose this in Apple Script / Java Script, so you could use it with the "If Java Script Returns True" condition. I'l add it with one of the next versions.

Cool, thanks.