Please see the FAQs on How to create a new action. That post also contains a link to the action Remove fields except