You can create and run various actions from the Attribute Table for each feature. If you go to Layer Properties > Actions
and add a new action, there is an option which allows you to run the action from the attribute table:
Once you have created an action, you can choose to show it as a combo box:
Now when you open your attribute table, you can see a new field containing the actions:
If you want your action to be run on multiple selected features, you will need to include this into your action (if possible). In my example, I am using Python to print the values from the first field for all selected features. So if I select multiple features and then click on any action combo box, it will print the values of the selected features:
However, there seems to be a Run layer action
when you right-click an attribute but unfortunately, I can't seem to find much information concerning this. I have posted this as a new question as I am also curious: