If you are using a CSV with a header row as your source message type, you can use a JSON template (see here https://www.qvera.com/kb/index.php/1862/how-can-i-use-a-json-template-with-evaluatetemplate?show=1862#q1862). Rather than use messageCache to populate the JSON template as in that example, you would use the source message using /*{testValue}*/, where 'testValue' is the column name from the header row.
While not specifically related to your situation, we have an HL7 <-> JSON sandbox that may give you some examples of how to populate a JSON message from a different source type; you'll have to adapt the information contained in the sandbox to your specific scenario, but it should give you some examples of populating JSON messages.
The JSON ‹–› HL7 Sandbox