How can i send variables form function to function
The input message to a function node is always called msg
(no matter what you may have called it in a previous function node).
So in the example you have given to access the payload of the incoming message in the second function node you would just use msg.payload
. (so in this example the second function node is redundant, but I expect you are actually doing more than is shown)