feat: add folder support for workflows (fixes #70)
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"id": 12,
|
||||
"name": "Create Onfleet tasks from Spreadsheets",
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Onfleet",
|
||||
"type": "n8n-nodes-base.onfleet",
|
||||
"position": [
|
||||
900,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "create",
|
||||
"destination": {
|
||||
"destinationProperties": {
|
||||
"address": "={{$json[\"Address_Line1\"]}}, {{$json[\"Address_Line2\"]}}, {{$json[\"City/Town\"]}} {{$json[\"State/Province\"]}}, {{$json[\"Country\"]}}, {{$json[\"Postal_Code\"]}}",
|
||||
"unparsed": true,
|
||||
"addressNotes": "=",
|
||||
"addressApartment": "={{$json[\"Address_Line2\"]}}"
|
||||
}
|
||||
},
|
||||
"additionalFields": {
|
||||
"notes": "={{$json[\"Task_Details\"]}}",
|
||||
"recipient": {
|
||||
"recipientProperties": {
|
||||
"recipientName": "={{$json[\"Recipient_Name\"]}}",
|
||||
"recipientNotes": "={{$json[\"Recipient_Notes\"]}}",
|
||||
"recipientPhone": "=+1{{$json[\"Recipient_Phone\"]}}"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"onfleetApi": {
|
||||
"id": "2",
|
||||
"name": "Onfleet API Key"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Read Binary File",
|
||||
"type": "n8n-nodes-base.readBinaryFile",
|
||||
"position": [
|
||||
500,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"filePath": "=/Users/jamesli/Downloads/Onfleet Import Google Sheet.xlsx"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Spreadsheet File1",
|
||||
"type": "n8n-nodes-base.spreadsheetFile",
|
||||
"position": [
|
||||
700,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"settings": {},
|
||||
"connections": {
|
||||
"Read Binary File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Spreadsheet File1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Spreadsheet File1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Onfleet",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"name": "On clicking 'execute'",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-240,
|
||||
180
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Read Binary File",
|
||||
"type": "n8n-nodes-base.readBinaryFile",
|
||||
"position": [
|
||||
-60,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"filePath": "/username/n8n_spreadsheet.csv"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Spreadsheet File1",
|
||||
"type": "n8n-nodes-base.spreadsheetFile",
|
||||
"position": [
|
||||
120,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Move Binary Data",
|
||||
"type": "n8n-nodes-base.moveBinaryData",
|
||||
"position": [
|
||||
300,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "jsonToBinary",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Write Binary File",
|
||||
"type": "n8n-nodes-base.writeBinaryFile",
|
||||
"position": [
|
||||
480,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"fileName": "/username/n8n_spreadsheet.json"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Move Binary Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Write Binary File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Read Binary File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Spreadsheet File1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Spreadsheet File1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Move Binary Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"On clicking 'execute'": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Read Binary File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
{
|
||||
"id": 1,
|
||||
"name": "My workflow",
|
||||
"nodes": [
|
||||
{
|
||||
"name": "On clicking 'execute'",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
320,
|
||||
300
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Send Email",
|
||||
"type": "n8n-nodes-base.emailSend",
|
||||
"position": [
|
||||
1520,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"allowUnauthorizedCerts": true
|
||||
},
|
||||
"subject": "Certificate For Course",
|
||||
"toEmail": "={{$node[\"SplitInBatches\"].json[\"email\"]}}",
|
||||
"fromEmail": "bhavabhuthi@riseup.net",
|
||||
"attachments": "data"
|
||||
},
|
||||
"credentials": {
|
||||
"smtp": {
|
||||
"id": "1",
|
||||
"name": "SMTP account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Read Binary File",
|
||||
"type": "n8n-nodes-base.readBinaryFile",
|
||||
"position": [
|
||||
560,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"filePath": "/home/shashikanth/Documents/Cert-Gen-Test/data.csv",
|
||||
"dataPropertyName": "csv"
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"name": "Spreadsheet File",
|
||||
"type": "n8n-nodes-base.spreadsheetFile",
|
||||
"position": [
|
||||
840,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"headerRow": true
|
||||
},
|
||||
"binaryPropertyName": "csv"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "SplitInBatches",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
1080,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"reset": false
|
||||
},
|
||||
"batchSize": 5
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Read Binary File1",
|
||||
"type": "n8n-nodes-base.readBinaryFile",
|
||||
"position": [
|
||||
1300,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"filePath": "=/home/shashikanth/Documents/Cert-Gen-Test/generator-output/{{$json[\"name\"]}}.png"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"settings": {},
|
||||
"connections": {
|
||||
"SplitInBatches": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Read Binary File1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Read Binary File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Spreadsheet File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Spreadsheet File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "SplitInBatches",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Read Binary File1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"On clicking 'execute'": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Read Binary File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Read Binary File",
|
||||
"type": "n8n-nodes-base.readBinaryFile",
|
||||
"position": [
|
||||
450,
|
||||
650
|
||||
],
|
||||
"parameters": {
|
||||
"filePath": "spreadsheet.xls"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Spreadsheet File1",
|
||||
"type": "n8n-nodes-base.spreadsheetFile",
|
||||
"position": [
|
||||
600,
|
||||
650
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Insert Rows1",
|
||||
"type": "n8n-nodes-base.postgres",
|
||||
"position": [
|
||||
750,
|
||||
650
|
||||
],
|
||||
"parameters": {
|
||||
"table": "product",
|
||||
"columns": "name,ean"
|
||||
},
|
||||
"credentials": {
|
||||
"postgres": "postgres"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Read Binary File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Spreadsheet File1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Spreadsheet File1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Insert Rows1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
{
|
||||
"id": "2",
|
||||
"name": "SIGNL4 Alert",
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Cron",
|
||||
"type": "n8n-nodes-base.cron",
|
||||
"position": [
|
||||
350,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"triggerTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyHour"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Write Binary File",
|
||||
"type": "n8n-nodes-base.writeBinaryFile",
|
||||
"position": [
|
||||
880,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"fileName": "alert-data.json"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Read Binary File",
|
||||
"type": "n8n-nodes-base.readBinaryFile",
|
||||
"position": [
|
||||
450,
|
||||
270
|
||||
],
|
||||
"parameters": {
|
||||
"filePath": "alert-data.json"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Binary to JSON",
|
||||
"type": "n8n-nodes-base.moveBinaryData",
|
||||
"position": [
|
||||
630,
|
||||
270
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "JSON to Binary",
|
||||
"type": "n8n-nodes-base.moveBinaryData",
|
||||
"position": [
|
||||
720,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "jsonToBinary",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Mark as Done",
|
||||
"type": "n8n-nodes-base.function",
|
||||
"position": [
|
||||
560,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"functionCode": "items[0].json.Body = $node[\"Binary to JSON\"].json.Body;\nitems[0].json.Done = true;\nitems[0].json.eventId = $node[\"SIGNL4 Alert\"].json.eventId;\nitems[0].json.lastId = $node[\"Binary to JSON\"].json.eventId;\n\nreturn items;"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "IF",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
810,
|
||||
270
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"boolean": [
|
||||
{
|
||||
"value1": "={{$node[\"Binary to JSON\"].json[\"Done\"]}}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"combineOperation": "=all"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "SIGNL4 Resolve",
|
||||
"type": "n8n-nodes-base.signl4",
|
||||
"position": [
|
||||
1040,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "resolve",
|
||||
"externalId": "={{$node[\"Binary to JSON\"].json[\"lastId\"]}}"
|
||||
},
|
||||
"credentials": {
|
||||
"signl4Api": "Team"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "SIGNL4 Alert",
|
||||
"type": "n8n-nodes-base.signl4",
|
||||
"position": [
|
||||
990,
|
||||
270
|
||||
],
|
||||
"parameters": {
|
||||
"message": "={{$node[\"Binary to JSON\"].json[\"Body\"]}}",
|
||||
"additionalFields": {
|
||||
"externalId": "={{$node[\"Binary to JSON\"].json[\"eventId\"]}}",
|
||||
"locationFieldsUi": {
|
||||
"locationFieldsValues": {
|
||||
"latitude": "52.3984235",
|
||||
"longitude": "13.0544149"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"signl4Api": "Team"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": true,
|
||||
"settings": {
|
||||
"timezone": "Europe/Berlin"
|
||||
},
|
||||
"connections": {
|
||||
"IF": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "SIGNL4 Alert",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "SIGNL4 Resolve",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Cron": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Read Binary File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Mark as Done": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "JSON to Binary",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"SIGNL4 Alert": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Mark as Done",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Binary to JSON": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "IF",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"JSON to Binary": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Write Binary File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Read Binary File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Binary to JSON",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user