d41f8812a7
n8n workflow
379 lines
12 KiB
JSON
379 lines
12 KiB
JSON
{
|
||
"name": "My workflow",
|
||
"nodes": [
|
||
{
|
||
"parameters": {
|
||
"formTitle": "Check URL",
|
||
"formFields": {
|
||
"values": [
|
||
{
|
||
"fieldType": "html",
|
||
"html": "<div style=\"margin-bottom: 15px;\">\n <p style=\"margin-bottom: 10px;\">\n Der Anwendungsname ist der offizielle Name der Software. Sie finden ihn in der Regel in der Anwendung selbst, z. B. unter „Hilfe → Info“, „Über…“ oder im Startbildschirm.\n </p>\n <label for=\"email\"></label><br>\n <input type=\"email\" id=\"email\" name=\"email\" style=\"margin-top: 5px; padding: 5px; width: 100%;\">\n</div>\n"
|
||
},
|
||
{
|
||
"fieldLabel": "E-Mail",
|
||
"fieldType": "email",
|
||
"requiredField": true
|
||
},
|
||
{
|
||
"fieldLabel": "Name der Anwendung:",
|
||
"requiredField": true
|
||
},
|
||
{
|
||
"fieldLabel": "Version:"
|
||
}
|
||
]
|
||
},
|
||
"options": {
|
||
"buttonLabel": "Anwendung prüfen",
|
||
"respondWithOptions": {
|
||
"values": {
|
||
"formSubmittedText": "Email wird Versendet!"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"type": "n8n-nodes-base.formTrigger",
|
||
"typeVersion": 2.2,
|
||
"position": [
|
||
-336,
|
||
-192
|
||
],
|
||
"id": "e11312df-26ab-40f5-879b-5c2c2b498a44",
|
||
"name": "On form submission",
|
||
"webhookId": "698b2338-d434-4db5-a064-2da34809c491"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"assignments": {
|
||
"assignments": [
|
||
{
|
||
"id": "86b379e5-5ff1-4c49-9620-c03d2023d8cd",
|
||
"name": "Email",
|
||
"value": "={{ $json['E-Mail'] }}",
|
||
"type": "string"
|
||
},
|
||
{
|
||
"id": "70edd998-30cf-47c0-b1f1-702249bf8ee1",
|
||
"name": "AnwendungsName",
|
||
"value": "={{ $json['Name der Anwendung:'] }}",
|
||
"type": "string"
|
||
},
|
||
{
|
||
"id": "1d5eae01-b8bf-4a1b-a6e0-3caa00650731",
|
||
"name": "Version",
|
||
"value": "={{ $json['Version:'] }}",
|
||
"type": "string"
|
||
}
|
||
]
|
||
},
|
||
"options": {}
|
||
},
|
||
"type": "n8n-nodes-base.set",
|
||
"typeVersion": 3.4,
|
||
"position": [
|
||
-112,
|
||
-192
|
||
],
|
||
"id": "3b6db320-c332-45cb-a694-d839f8f3a4f4",
|
||
"name": "Edit Fields"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"operation": "executeQuery",
|
||
"query": "SELECT Anwendung, Farbe From Valide Where Anwendung Like '%{{ $json.AnwendungsName }}%'"
|
||
},
|
||
"type": "n8n-nodes-base.microsoftSql",
|
||
"typeVersion": 1.1,
|
||
"position": [
|
||
96,
|
||
-192
|
||
],
|
||
"id": "ceec887d-88da-42c9-947d-3225ef4c761c",
|
||
"name": "Microsoft SQL1",
|
||
"credentials": {
|
||
"microsoftSql": {
|
||
"id": "djdfLzBSpOyGbd5J",
|
||
"name": "Microsoft SQL account"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"parameters": {
|
||
"fromEmail": "testschulen8n@gmail.com",
|
||
"toEmail": "={{ $('On form submission').item.json['E-Mail'] }}",
|
||
"subject": "Datenschutz Prüfung",
|
||
"html": "={{ $json.html }}",
|
||
"options": {}
|
||
},
|
||
"type": "n8n-nodes-base.emailSend",
|
||
"typeVersion": 2.1,
|
||
"position": [
|
||
1088,
|
||
-160
|
||
],
|
||
"id": "ccb3f806-3c1c-407d-b60c-e2f14dfe7deb",
|
||
"name": "Send email",
|
||
"webhookId": "24c30897-71b1-46b6-a704-ef008f4277aa",
|
||
"credentials": {
|
||
"smtp": {
|
||
"id": "QV9RLh6CctQW2oah",
|
||
"name": "SMTP account"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"parameters": {
|
||
"jsCode": "return [\n {\n json: {\n html: `\n \n<!DOCTYPE html>\n<html lang=\"de\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Einfach Ampel</title>\n</head>\n<body>\n \n <div style=\"width: 100px; background-color: #333; padding: 20px; border-radius: 20px; display: flex; flex-direction: column; gap: 15px;\">\n \n <div style=\"width: 60px; height: 60px; border-radius: 50%; background-color: black; margin: 0 auto;\"></div>\n \n <div style=\"width: 60px; height: 60px; border-radius: 50%; background-color: yellow; margin: 0 auto;\"></div>\n \n <div style=\"width: 60px; height: 60px; border-radius: 50%; background-color: black; margin: 0 auto;\"></div>\n \n </div>\n \n <!-- URL -->\n<p>URL: <a href=\"${$json.URLAnwendung}\" target=\"_blank\">Hier klicken</a></p>\n\n\n <!-- Weitere Infos -->\n <p>Info 1: Gelb, es gibt zwar noch kritische Punkte, die Aufmerksamkeit erfordern</p>\n\n</body>\n</html>\n \n `\n }\n }\n];\n"
|
||
},
|
||
"type": "n8n-nodes-base.code",
|
||
"typeVersion": 2,
|
||
"position": [
|
||
704,
|
||
-192
|
||
],
|
||
"id": "223639a8-af29-4bf6-951b-19257b8fdf0f",
|
||
"name": "Code2"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"jsCode": "return [\n {\n json: {\n html: `\n<!DOCTYPE html>\n<html lang=\"de\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Einfach Ampel</title>\n</head>\n<body>\n \n <div style=\"width: 100px; background-color: #333; padding: 20px; border-radius: 20px; display: flex; flex-direction: column; gap: 15px;\">\n \n <div style=\"width: 60px; height: 60px; border-radius: 50%; background-color: red; margin: 0 auto;\"></div>\n \n <div style=\"width: 60px; height: 60px; border-radius: 50%; background-color: black; margin: 0 auto;\"></div>\n \n <div style=\"width: 60px; height: 60px; border-radius: 50%; background-color: black; margin: 0 auto;\"></div>\n \n </div>\n <!-- URL -->\n<p>URL: <a href=\"${$json.URLAnwendung}\" target=\"_blank\">Hier klicken</a></p>\n\n <!-- Weitere Infos -->\n <p>Info 1: Rot, die Datenschutzbestimmungen wurden aufgrund von Problemen nicht akzeptiert</p>\n\n</body>\n</html>\n `\n }\n }\n];\n"
|
||
},
|
||
"type": "n8n-nodes-base.code",
|
||
"typeVersion": 2,
|
||
"position": [
|
||
704,
|
||
-336
|
||
],
|
||
"id": "8409a40b-605b-4823-b690-829ac0ad837a",
|
||
"name": "Code3"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"jsCode": "return [\n {\n json: {\n html: `\n<!DOCTYPE html>\n<html lang=\"de\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Einfach Ampel</title>\n</head>\n<body>\n \n <div style=\"width: 100px; background-color: #333; padding: 20px; border-radius: 20px; display: flex; flex-direction: column; gap: 15px;\">\n \n <div style=\"width: 60px; height: 60px; border-radius: 50%; background-color: black; margin: 0 auto;\"></div>\n \n <div style=\"width: 60px; height: 60px; border-radius: 50%; background-color: black; margin: 0 auto;\"></div>\n \n <div style=\"width: 60px; height: 60px; border-radius: 50%; background-color: green; margin: 0 auto;\"></div>\n \n </div>\n \n <!-- URL -->\n<p>URL: <a href=\"${$json.URLAnwendung}\" target=\"_blank\">Hier klicken</a></p>\n\n <!-- Weitere Infos -->\n <p>Info 1: Grün, alle Datenschutzanforderungen sind erfüllt und keine Probleme bestehen.</</p>\n\n</body>\n</html>\n `\n }\n }\n];\n"
|
||
},
|
||
"type": "n8n-nodes-base.code",
|
||
"typeVersion": 2,
|
||
"position": [
|
||
704,
|
||
-32
|
||
],
|
||
"id": "fe73c875-2da6-4398-b9e7-ab1ffd9c7d04",
|
||
"name": "Code4"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"rules": {
|
||
"values": [
|
||
{
|
||
"conditions": {
|
||
"options": {
|
||
"caseSensitive": true,
|
||
"leftValue": "",
|
||
"typeValidation": "strict",
|
||
"version": 2
|
||
},
|
||
"conditions": [
|
||
{
|
||
"leftValue": "={{ $json.Farbe }}",
|
||
"rightValue": "green",
|
||
"operator": {
|
||
"type": "string",
|
||
"operation": "equals"
|
||
},
|
||
"id": "e407db7e-c62f-446f-b050-a2da0cf47164"
|
||
}
|
||
],
|
||
"combinator": "and"
|
||
}
|
||
},
|
||
{
|
||
"conditions": {
|
||
"options": {
|
||
"caseSensitive": true,
|
||
"leftValue": "",
|
||
"typeValidation": "strict",
|
||
"version": 2
|
||
},
|
||
"conditions": [
|
||
{
|
||
"id": "bec012ef-ea1f-4eb7-86fc-cb0bd6c24ae3",
|
||
"leftValue": "={{ $json.Farbe }}",
|
||
"rightValue": "yellow",
|
||
"operator": {
|
||
"type": "string",
|
||
"operation": "equals",
|
||
"name": "filter.operator.equals"
|
||
}
|
||
}
|
||
],
|
||
"combinator": "and"
|
||
}
|
||
},
|
||
{
|
||
"conditions": {
|
||
"options": {
|
||
"caseSensitive": true,
|
||
"leftValue": "",
|
||
"typeValidation": "strict",
|
||
"version": 2
|
||
},
|
||
"conditions": [
|
||
{
|
||
"id": "57bf0a44-0930-4ec4-bb7e-46ac02c8472f",
|
||
"leftValue": "={{ $json.Farbe }}",
|
||
"rightValue": "red",
|
||
"operator": {
|
||
"type": "string",
|
||
"operation": "equals",
|
||
"name": "filter.operator.equals"
|
||
}
|
||
}
|
||
],
|
||
"combinator": "and"
|
||
}
|
||
},
|
||
{
|
||
"conditions": {
|
||
"options": {
|
||
"caseSensitive": true,
|
||
"leftValue": "",
|
||
"typeValidation": "strict",
|
||
"version": 2
|
||
},
|
||
"conditions": [
|
||
{
|
||
"id": "eed6d263-ae94-48ce-a996-bece887855c8",
|
||
"leftValue": "={{ $json.Farbe }}",
|
||
"rightValue": "unbekannt",
|
||
"operator": {
|
||
"type": "string",
|
||
"operation": "equals",
|
||
"name": "filter.operator.equals"
|
||
}
|
||
}
|
||
],
|
||
"combinator": "and"
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"options": {}
|
||
},
|
||
"type": "n8n-nodes-base.switch",
|
||
"typeVersion": 3.2,
|
||
"position": [
|
||
368,
|
||
-224
|
||
],
|
||
"id": "3b48bcf7-dd8c-4328-8417-408b8c43d3b3",
|
||
"name": "Switch"
|
||
}
|
||
],
|
||
"pinData": {},
|
||
"connections": {
|
||
"On form submission": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Edit Fields",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"Edit Fields": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Microsoft SQL1",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"Microsoft SQL1": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Switch",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"Switch": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Code4",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
],
|
||
[
|
||
{
|
||
"node": "Code2",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
],
|
||
[
|
||
{
|
||
"node": "Code3",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
],
|
||
[]
|
||
]
|
||
},
|
||
"Code3": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Send email",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"Code2": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Send email",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
},
|
||
"Code4": {
|
||
"main": [
|
||
[
|
||
{
|
||
"node": "Send email",
|
||
"type": "main",
|
||
"index": 0
|
||
}
|
||
]
|
||
]
|
||
}
|
||
},
|
||
"active": false,
|
||
"settings": {
|
||
"executionOrder": "v1"
|
||
},
|
||
"versionId": "cefe6a6c-40e1-4f1e-bc94-4821c80410bb",
|
||
"meta": {
|
||
"templateCredsSetupCompleted": true,
|
||
"instanceId": "b7269067285ce522731ca81186ba09707a0ea125a4dea42e18c518a85012a790"
|
||
},
|
||
"id": "uBtwr3o5oN3RflKc",
|
||
"tags": []
|
||
} |