first you need to use the switch node to route your message according to the action, then using a change node you can set the payload to what ever you require.
If you use a debug node and use the copy value button that appears when you hover near the object name, you can then post a copy of the incoming objects. I could then use that to post an example flow for you.
You should take some time and read through the node-red docs and watch the videos, as this will help you understand many things, including how to share info and how message routing work and how to share flows, import/export.
When sharing code on this forum it is best to use the </> button in the post editor