Files
n8n/flows/10.json

171 lines
4.0 KiB
JSON
Raw Normal View History

2022-05-26 20:57:30 +03:00
{
"id": 10,
"name": "OpenData to Mattermost",
2022-06-01 21:00:37 +00:00
"active": true,
2022-05-26 20:57:30 +03:00
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
-200,
340
]
},
{
"parameters": {
"channelId": "u8419oxttpbptfqxu9mhzumhwa",
"message": "=Оприлюднити \"{{$json[\"subject\"]}}\" від {{$json[\"from\"]}}",
"attachments": [
{
"title": "Відкриті дані",
"color": "#F2FF00",
"author_name": "={{$json[\"from\"]}}"
}
],
"otherOptions": {}
},
"name": "Mattermost",
"type": "n8n-nodes-base.mattermost",
"typeVersion": 1,
"position": [
440,
40
],
"credentials": {
"mattermostApi": {
"id": "11",
"name": "Mattermost account"
}
}
},
{
"parameters": {
"postProcessAction": "nothing",
"options": {}
},
"name": "IMAP Email",
"type": "n8n-nodes-base.emailReadImap",
"typeVersion": 1,
"position": [
2022-06-07 21:00:34 +00:00
-200,
2022-05-26 20:57:30 +03:00
60
],
"credentials": {
"imap": {
"id": "12",
"name": "IMAP account"
}
}
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"to\"]}}",
"operation": "contains",
"value2": "data@chernigiv-rada.gov.ua"
}
]
}
},
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
20,
60
]
},
{
"parameters": {
"fromEmail": "it@chernigiv-rada.gov.ua",
"toEmail": "={{$json[\"from\"]}}",
"subject": "=Відповідь на \"{{$json[\"subject\"]}}\"",
"text": "=Ми отримали Ваш запит \"{{$json[\"subject\"]}}\"на публікацію відкритих даних на порталі https://data.gov.ua\nЗробимо все, що від нас залежить.\nВаші дані будуть відкриті як ніколи до цього",
"options": {}
},
"name": "Send Email",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 1,
"position": [
440,
260
],
"credentials": {
"smtp": {
"id": "18",
"name": "SMTP account"
}
}
},
{
"parameters": {
"operation": "create",
"taskListId": "AQMkADAwATNiZmYAZC05MzYzLWQ5YjYtMDACLTAwCgAuAAADIyRvDrjkMkCmTApWtV1lbAEAodXeAPq8WUqqkl0jol24wwAFPoYtoAAAAA==",
"title": "=Открытые данные от {{$json[\"from\"]}}",
"additionalFields": {
"content": "={{$json[\"subject\"]}}",
"dueDateTime": "={{$json[\"date\"]}}"
}
},
"name": "Microsoft To Do",
"type": "n8n-nodes-base.microsoftToDo",
"typeVersion": 1,
"position": [
440,
440
],
"credentials": {
"microsoftToDoOAuth2Api": {
"id": "4",
"name": "Microsoft To Do account"
}
}
}
],
"connections": {
"IMAP Email": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
[
{
"node": "Mattermost",
"type": "main",
"index": 0
},
{
"node": "Microsoft To Do",
"type": "main",
"index": 0
},
{
"node": "Send Email",
"type": "main",
"index": 0
}
]
]
}
},
"createdAt": "2022-04-29T05:12:17.339Z",
2022-06-08 21:00:42 +00:00
"updatedAt": "2022-06-08T13:35:33.934Z",
2022-05-26 20:57:30 +03:00
"settings": {},
"staticData": {
"node:IMAP Email": {
2022-06-08 21:00:42 +00:00
"lastMessageUid": 6287
2022-05-26 20:57:30 +03:00
}
}
}