feat: add folder support for workflows (fixes #70)
This commit is contained in:
64
workflows/Writebinaryfile/0010_Writebinaryfile_Create.json
Normal file
64
workflows/Writebinaryfile/0010_Writebinaryfile_Create.json
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Write Binary File",
|
||||
"type": "n8n-nodes-base.writeBinaryFile",
|
||||
"position": [
|
||||
800,
|
||||
350
|
||||
],
|
||||
"parameters": {
|
||||
"fileName": "test.json"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"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
|
||||
},
|
||||
{
|
||||
"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
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Make Binary": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Write Binary File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Example Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Make Binary",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Run Query",
|
||||
"type": "n8n-nodes-base.postgres",
|
||||
"position": [
|
||||
450,
|
||||
450
|
||||
],
|
||||
"parameters": {
|
||||
"query": "SELECT name, ean FROM product",
|
||||
"operation": "executeQuery"
|
||||
},
|
||||
"credentials": {
|
||||
"postgres": "postgres"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Spreadsheet File",
|
||||
"type": "n8n-nodes-base.spreadsheetFile",
|
||||
"position": [
|
||||
600,
|
||||
450
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "toFile"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Write Binary File",
|
||||
"type": "n8n-nodes-base.writeBinaryFile",
|
||||
"position": [
|
||||
750,
|
||||
450
|
||||
],
|
||||
"parameters": {
|
||||
"fileName": "spreadsheet.xls"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Run Query": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Spreadsheet File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Spreadsheet File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Write Binary File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user