Files
n8n/flows/20.json

333 lines
7.5 KiB
JSON
Raw Normal View History

2022-05-26 20:57:30 +03:00
{
"id": 20,
"name": "hosting",
"active": true,
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
400,
260
]
},
{
"parameters": {
"operation": "getAll",
2022-06-25 21:00:29 +00:00
"taskListId": "AQMkADAwATNiZmYAZC05MzYzLWQ5YjYtMDACLTAwCgAuAAADIyRvDrjkMkCmTApWtV1lbAEAodXeAPq8WUqqkl0jol24wwAE1-QrCgAAAA==",
"returnAll": true
2022-05-26 20:57:30 +03:00
},
"name": "Microsoft To Do",
"type": "n8n-nodes-base.microsoftToDo",
"typeVersion": 1,
"position": [
660,
460
],
"credentials": {
"microsoftToDoOAuth2Api": {
"id": "4",
"name": "Microsoft To Do account"
}
}
},
{
"parameters": {
"triggerTimes": {
"item": [
{
2022-06-27 21:00:30 +00:00
"hour": 9
2022-05-26 20:57:30 +03:00
}
]
}
},
"name": "Cron",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [
400,
460
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"status\"]}}",
"operation": "notEqual",
"value2": "completed"
}
],
"dateTime": [
{
"value1": "={{$json[\"dueDateTime\"][\"dateTime\"]}}",
"operation": "before",
"value2": "={{$today.plus({days: 1}).toString()}}"
}
]
}
},
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
900,
460
]
},
2022-06-15 07:08:13 +00:00
{
"parameters": {
"values": {
"string": [
{
"name": "deadline_date",
"value": "={{$json[\"dueDateTime\"][\"dateTime\"]}}"
},
{
"name": "dead_date",
"value": "={{DateTime.fromISO($json[\"dueDateTime\"][\"dateTime\"]).plus({days: 7}).toString()}}"
},
{
"name": "days_to_dead",
"value": "={{$today.diff(DateTime.fromISO($json[\"dueDateTime\"][\"dateTime\"]).plus({days: 7}), 'days').toObject().days.toString().substring(1, 2)}}"
}
]
},
"options": {}
},
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1140,
460
]
},
2022-05-26 20:57:30 +03:00
{
"parameters": {
"operation": "sendTemplate",
"fromEmail": "nia@cynic.club",
"toEmail": "Ihor.nahornyy@gmail.com ",
"templateId": 3928678,
"additionalFields": {
"fromName": "DCXV",
"templateLanguage": true
},
"variablesUi": {
"variablesValues": [
{
"name": "server_name",
"value": "={{$json[\"title\"]}}"
},
{
"name": "username",
"value": "nahornyy"
},
{
"name": "price",
"value": "={{$json[\"body\"][\"content\"]}}"
},
{
"name": "days_gone",
"value": "={{$json[\"days_to_dead\"]}}"
}
]
}
},
"name": "Mailjet",
"type": "n8n-nodes-base.mailjet",
"typeVersion": 1,
"position": [
1360,
460
],
"credentials": {
"mailjetEmailApi": {
"id": "27",
"name": "Mailjet Email account"
}
}
2022-06-25 21:00:29 +00:00
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"status\"]}}",
"operation": "notEqual",
"value2": "completed"
}
],
"dateTime": [
{
"value1": "={{$json[\"dueDateTime\"][\"dateTime\"]}}",
"operation": "before",
"value2": "={{$today.plus({days: 7}).toString()}}"
}
]
}
},
"name": "IF1",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
900,
280
]
},
{
"parameters": {
"values": {
"string": [
{
"name": "deadline_date",
"value": "={{DateTime.fromISO($json[\"dueDateTime\"][\"dateTime\"]).minus({days: 7}).toString()}}"
},
{
"name": "dead_date",
"value": "={{DateTime.fromISO($json[\"dueDateTime\"][\"dateTime\"]).toString()}}"
},
{
"name": "days_to_dead",
2022-07-04 21:00:50 +00:00
"value": "={{$today.minus({days: 1}).diff(DateTime.fromISO($json[\"dueDateTime\"][\"dateTime\"]), 'days').toObject().days.toString().substring(1, 2)}}"
},
{
"name": "date",
"value": "={{DateTime.fromISO($json[\"dueDateTime\"][\"dateTime\"]).plus({days: 1}).setLocale('ru').toFormat('dd MMMM yyyy года')}}"
2022-06-25 21:00:29 +00:00
}
]
},
"options": {}
},
"name": "Set1",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1140,
280
]
},
{
"parameters": {
"operation": "sendTemplate",
"fromEmail": "nia@cynic.club",
"toEmail": "Ihor.nahornyy@gmail.com ",
"templateId": 3928678,
"additionalFields": {
"fromName": "DCXV",
"templateLanguage": true
},
"variablesUi": {
"variablesValues": [
{
"name": "server_name",
"value": "={{$json[\"title\"]}}"
},
{
"name": "username",
"value": "nahornyy"
},
{
"name": "price",
"value": "={{$json[\"body\"][\"content\"]}}"
},
{
"name": "days_gone",
"value": "={{$json[\"days_to_dead\"]}}"
2022-07-04 21:00:50 +00:00
},
{
"name": "date",
"value": "={{$json[\"date\"]}}"
2022-06-25 21:00:29 +00:00
}
]
}
},
"name": "Mailjet1",
"type": "n8n-nodes-base.mailjet",
"typeVersion": 1,
"position": [
1360,
280
],
"credentials": {
"mailjetEmailApi": {
"id": "27",
"name": "Mailjet Email account"
}
2022-07-04 21:00:50 +00:00
},
"disabled": true
2022-05-26 20:57:30 +03:00
}
],
"connections": {
"Cron": {
"main": [
[
{
"node": "Microsoft To Do",
"type": "main",
"index": 0
}
]
]
},
"Microsoft To Do": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
2022-06-25 21:00:29 +00:00
},
{
"node": "IF1",
"type": "main",
"index": 0
2022-05-26 20:57:30 +03:00
}
]
]
},
2022-06-25 21:00:29 +00:00
"Set": {
2022-05-26 20:57:30 +03:00
"main": [
[
{
2022-06-25 21:00:29 +00:00
"node": "Mailjet",
2022-05-26 20:57:30 +03:00
"type": "main",
"index": 0
}
]
]
},
2022-06-25 21:00:29 +00:00
"IF1": {
2022-05-26 20:57:30 +03:00
"main": [
[
{
2022-06-25 21:00:29 +00:00
"node": "Set1",
"type": "main",
"index": 0
}
]
]
},
"Set1": {
"main": [
[
{
"node": "Mailjet1",
2022-05-26 20:57:30 +03:00
"type": "main",
"index": 0
}
]
]
}
},
"createdAt": "2022-05-11T17:19:39.626Z",
2022-07-04 21:00:50 +00:00
"updatedAt": "2022-07-04T06:16:14.220Z",
2022-06-27 21:00:30 +00:00
"settings": {
"errorWorkflow": "25"
},
2022-06-09 21:00:39 +00:00
"staticData": null,
"tags": []
2022-05-26 20:57:30 +03:00
}