When something is not working it is important to look at each node output along the way and work out where it is going wrong.
Did you connect a debug node to the template output and see what it gives?
You didn't answer the question as to whether that is what you wanted out of the node.
In addition to answering those questions post the flow for the nodes after the template so we can see what you are doing with it. You only posted the template node previously, and for me it is performing exactly as it should. You did not get the flow posting format quite right, see this post for the best way. How to share code or flow json