@tcurdt The read and write node work with binary data, so you gotta transform the data to binary before using them. See example below:
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"functionCode": "items[0].json = { hola: 1 };\nreturn items;"
},
"name": "Data",
"type": "n8n-nodes-base.function",
"position": [
450,
300
],
"typeVersion": 1
},
{
"parameters": {
"fileName": "old.json"
},
"name": "Write",
"type": "n8n-nodes-base.writeBinaryFile",
"typeVersion": 1,
"position": [
810,
300
]
},
{
"parameters": {
"filePath": "old.json"
},
"name": "Read",
"type": "n8n-nodes-base.readBinaryFile",
"typeVersion": 1,
"position": [
980,
300
]
},
{
"parameters": {
"mode": "jsonToBinary",
"options": {}
},
"name": "Move Binary Data",
"type": "n8n-nodes-base.moveBinaryData",
"typeVersion": 1,
"position": [
630,
300
]
},
{
"parameters": {
"options": {
"keepSource": false
}
},
"name": "Move Binary Data1",
"type": "n8n-nodes-base.moveBinaryData",
"typeVersion": 1,
"position": [
1170,
300
]
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "Data",
"type": "main",
"index": 0
}
]
]
},
"Data": {
"main": [
[
{
"node": "Move Binary Data",
"type": "main",
"index": 0
}
]
]
},
"Write": {
"main": [
[
{
"node": "Read",
"type": "main",
"index": 0
}
]
]
},
"Read": {
"main": [
[
{
"node": "Move Binary Data1",
"type": "main",
"index": 0
}
]
]
},
"Move Binary Data": {
"main": [
[
{
"node": "Write",
"type": "main",
"index": 0
}
]
]
}
}
}