Function inside file output

Hello I would like blender to save images using the scene name. I am saving through output node, does it accepts functions? Doing “copy data path” just writes “name” without quotes. Any suggestions?