n8n
Workflow
Write Json To Disk Binary
This n8n workflow automates tasks and integrates with various services. Write Json To Disk Binary - ready to import and run in your n8n instance.
n8n
workflow.json
About This Script
This n8n workflow automates tasks and integrates with various services. Write Json To Disk Binary - ready to import and run in your n8n instance.
Features:
- Custom JavaScript function processing
Source Code
{
"nodes": [
{
"name": "Write Binary File",
"type": "n8n-nodes-base.writeBinaryFile",
"position": [
800,
350
],
"parameters": {
"fileName": "test.json"
},
"typeVersion": 1,
"id": "a9fc73a5-6975-4830-ac02-a4e8af8d1166"
},
{
"name": "Make Binary",
"type": "n8n-nodes-base.function",
"position": [
600,
350
],
"parameters": {
"functionCode": "items[0].binary = {\n data: {\n data: new Buffer(JSON.stringify(items[0].json, null, 2)).toString('base64')\n }\n};\nreturn items;"
},
"typeVersion": 1,
"id": "1aea04ee-d992-4aae-98c9-be2e08ff4668"
},
{
"name": "Create Example Data",
"type": "n8n-nodes-base.function",
"position": [
390,
350
],
"parameters": {
"functionCode": "items[0].json = {\n \"text\": \"asdf\",\n \"number\": 1\n};\nreturn items;"
},
"typeVersion": 1,
"id": "80ac92af-bc5d-4ad1-bdea-f6a34588c21c"
}
],
"connections": {
"Make Binary": {
"main": [
[
{
"node": "Write Binary File",
"type": "main",
"index": 0
}
]
]
},
"Create Example Data": {
"main": [
[
{
"node": "Make Binary",
"type": "main",
"index": 0
}
]
]
}
},
"n8n_version": "1.5.0"
}
Requirements
n8n instance, API credentials for connected services
Tags
#n8n
#automation
#workflow