I’ve made a workflow that will append new data to a csv file but the problem is when I run the workflow twice it’ll no longer can read the appended csv file cause it gives error. It works fine when you run it the first time but when you run it again it causes error. Does anyone know how to fix this?
It doesn’t work it still gives the same error but in your version I notice you use {{ $json.comic }} but that gives me [undefined] in the Result page where as If I use {{ $json[‘comic’] }} it’ll give the output
Might be because I modified the csv. There was an invisible BOM character ( U+FEFF) in your comic field name hence your requirement to use {{ $json[‘comic’] }}.
When you say it doesnt work, are you getting the same error?
You can try and manually editing both csv files by recreating the header column for “comic” to remove the BOM issue.
Further to my work around you need to make sure you enable fs with
To further make the code node re-usable without having to duplicate the code everytime you want to read the file, move the code node to a separate workflow and call it as a sub workflow passing in the file path you want to read.