HI,
maybe try it like this
[{"id":"204ed6bbfd6cf0cf","type":"inject","z":"27d4cd61f8c2d5ed","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"alfa\":\"abc\",\"beta\":\"def\"}","payloadType":"json","x":155,"y":465,"wires":[["c3c92da5ab35c8f6"]]},{"id":"c3c92da5ab35c8f6","type":"csv","z":"27d4cd61f8c2d5ed","name":"","sep":",","hdrin":"","hdrout":"once","multi":"one","ret":"\\n","temp":"alfa,beta","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":320,"y":465,"wires":[["b469713283c5c661"]]},{"id":"b469713283c5c661","type":"file","z":"27d4cd61f8c2d5ed","name":"","filename":"/tmp/foo.csv","filenameType":"str","appendNewline":false,"createDir":false,"overwriteFile":"false","encoding":"none","x":490,"y":465,"wires":[["8407a341dd4baefe"]]},{"id":"8407a341dd4baefe","type":"debug","z":"27d4cd61f8c2d5ed","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":675,"y":465,"wires":[]},{"id":"b67d539538ccbbcd","type":"inject","z":"27d4cd61f8c2d5ed","name":"reset","props":[{"p":"reset","v":"true","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":160,"y":525,"wires":[["c3c92da5ab35c8f6"]]}]
The csv node is set to only send the headers once (until the reset is hit and then ir send it again - but you many not need that).