categorize files

This commit is contained in:
Yunus Aydın
2025-05-18 17:57:46 +03:00
parent cbf76ab2ef
commit 355ea47e9d
293 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,221 @@
{
"meta": {
"instanceId": "84ba6d895254e080ac2b4916d987aa66b000f88d4d919a6b9c76848f9b8a7616",
"templateId": "2370"
},
"nodes": [
{
"id": "2ce91ec6-0a8c-438a-8a18-216001c9ee07",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
380,
240
],
"parameters": {
"width": 407.6388140161723,
"height": 490.24769122000794,
"content": "## This is a POST Webhook endpoint\n\nMake sure to configure this webhook using a https:// wraper and dont use the default http://localhost:5678 as that will not be recognized by your slack webhook\n\n\nOnce the data has been sent to your webhook, the next step will be passing it via an AI Agent to process data based on the queries we pass to our agent.\n\nTo have some sort of a memory, be sure to set the slack token to the memory node. This way you can refer to other chats from the history.\n\nThe final message is relayed back to slack as a new message. Since we can not wait longer than 3000 ms for slack response, we will create anew message with reference to the input we passed.\n\nWe can advance this using the tools or data sources for it to be more custom tailored for your company.\n"
},
"typeVersion": 1
},
{
"id": "7a0c84a8-90ef-4de8-b120-700c94c35a51",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1180,
560
],
"parameters": {
"color": 4,
"width": 221.73584905660368,
"height": 233,
"content": "### Conversation history is stored in memory using the body token as the chatsession id"
},
"typeVersion": 1
},
{
"id": "9b843e0e-42a6-4125-8c59-a7d5620a15f7",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
942.5229110512129,
560
],
"parameters": {
"color": 4,
"width": 217.47708894878716,
"height": 233,
"content": "### The chat LLM to process the prompt. Use any AI model here"
},
"typeVersion": 1
},
{
"id": "4efa968f-ebf5-42ec-80d3-907ef2622c61",
"name": "Google Gemini Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
1020,
640
],
"parameters": {
"options": {},
"modelName": "models/gemini-1.5-flash-latest"
},
"typeVersion": 1
},
{
"id": "fd1efd7c-7cd0-4edf-960e-19bd4567293e",
"name": "Window Buffer Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1260,
660
],
"parameters": {
"sessionKey": "={{ $('Webhook to receive message').item.json.body.token }}",
"sessionIdType": "customKey",
"contextWindowLength": 10
},
"typeVersion": 1.2
},
{
"id": "60d1eb77-492d-4a18-8cec-fa3f6ef8d707",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1467.5148247978436,
260
],
"parameters": {
"color": 4,
"width": 223.7196765498655,
"height": 236.66152029520293,
"content": "### Send the response from AI back to slack channel\n"
},
"typeVersion": 1
},
{
"id": "186069c0-5c79-4738-9924-de33998658bc",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
840,
180
],
"parameters": {
"color": 4,
"width": 561.423180592992,
"height": 340.09703504043114,
"content": "## Receive a POST webhook, process data and return response"
},
"typeVersion": 1
},
{
"id": "2bfce117-a769-46e1-a028-ed0c7ba62653",
"name": "Send response back to slack channel",
"type": "n8n-nodes-base.slack",
"position": [
1540,
320
],
"parameters": {
"text": "={{ $('Webhook to receive message').item.json.body.user_name }}: {{ $('Webhook to receive message').item.json.body.text }}\n\nEffibotics Bot: {{ $json.output.removeMarkdown() }} ",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Webhook to receive message').item.json.body.channel_id }}"
},
"otherOptions": {
"mrkdwn": true,
"sendAsUser": "Effibotics Bot",
"includeLinkToWorkflow": false
}
},
"typeVersion": 2.1
},
{
"id": "cfcf2bbc-8ed5-4a9f-8f35-cf2715686ebe",
"name": "Webhook to receive message",
"type": "n8n-nodes-base.webhook",
"position": [
880,
320
],
"webhookId": "28b84545-96aa-42f5-990b-aa8783a320ca",
"parameters": {
"path": "slack-bot",
"options": {
"responseData": ""
},
"httpMethod": "POST"
},
"typeVersion": 1
},
{
"id": "dc93e588-fc0b-4561-88a5-e1cccd48323f",
"name": "Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1100,
320
],
"parameters": {
"text": "={{ $json.body.text }}",
"options": {
"systemMessage": "You are Effibotics AI personal assistant. Your task will be to provide helpful assistance and advice related to automation and such tasks. "
}
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Agent": {
"main": [
[
{
"node": "Send response back to slack channel",
"type": "main",
"index": 0
}
]
]
},
"Window Buffer Memory": {
"ai_memory": [
[
{
"node": "Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Webhook to receive message": {
"main": [
[
{
"node": "Agent",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,487 @@
{
"meta": {
"instanceId": "26ba763460b97c249b82942b23b6384876dfeb9327513332e743c5f6219c2b8e"
},
"nodes": [
{
"id": "2b3112a9-046e-4aae-8fcc-95bddf3bb02e",
"name": "Slack",
"type": "n8n-nodes-base.slack",
"position": [
828,
327
],
"parameters": {
"limit": 10,
"query": "in:#n8n-tickets has::ticket:",
"options": {},
"operation": "search"
},
"credentials": {
"slackApi": {
"id": "VfK3js0YdqBdQLGP",
"name": "Slack account"
}
},
"typeVersion": 2.2
},
{
"id": "65fd6821-4d19-436c-81d9-9bdb0f5efddd",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1920,
480
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "85125704-7363-40de-af84-f267f8c7e919",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
2100,
480
],
"parameters": {
"jsonSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"title\": { \"type\": \"string\" },\n \"summary\": { \"type\": \"string\" },\n \"ideas\": {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\" }\n },\n \"priority\": { \"type\": \"string\" }\n }\n}"
},
"typeVersion": 1.1
},
{
"id": "eda8851a-1929-4f2f-9149-627c0fe62fbc",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
628,
327
],
"parameters": {
"rule": {
"interval": [
{
"field": "minutes"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "ad0d56b5-5caf-4fc0-bdbb-4e6207e4eb03",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
580,
112.87898199907983
],
"parameters": {
"color": 7,
"width": 432.4578914269739,
"height": 427.09547550768553,
"content": "## 1. Query Slack for Messages \n[Read more about the Slack Trigger](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.slack)\n\nSlack API search uses the same search syntax found in the app. Here, we'll use it to filter the latest messages with the ticket emoji within our designated channel called #n8n-tickets. "
},
"typeVersion": 1
},
{
"id": "d4ebe5b3-6d9a-4547-8af8-0985206c4ca4",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1040,
180.44851541532478
],
"parameters": {
"color": 7,
"width": 711.6907825442045,
"height": 632.7258798316449,
"content": "## 2. Decide If We Need to Create a New Ticket \n[Read more about using Linear](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.linear)\n\nFor generated issues, we add the message id to the description of the message so that we can check them at this point in the workflow to avoid duplicates."
},
"typeVersion": 1
},
{
"id": "b2920271-6698-47a4-8cac-ea4cec7b47d6",
"name": "Get Values",
"type": "n8n-nodes-base.set",
"position": [
1100,
360
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={\n \"id\": \"#{{ $json.permalink.split('/').last() }}\",\n \"type\": \"{{ $json.type }}\",\n \"title\": \"__NOT_SET__\",\n \"channel\": \"{{ $json.channel.name }}\",\n \"user\": \"{{ $json.username }} ({{ $json.user }})\",\n \"ts\": \"{{ $json.ts }}\",\n \"permalink\": \"{{ $json.permalink }}\",\n \"message\": \"{{ $json.text.replaceAll('\"','\\\\\"').replaceAll('\\n', '\\\\n') }}\"\n}"
},
"typeVersion": 3.3
},
{
"id": "c4a4db2a-5d1c-4726-8c98-aef57fdcfaa6",
"name": "Create New Ticket?",
"type": "n8n-nodes-base.if",
"position": [
1600,
360
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c11109b6-ee45-4b52-adc3-4be5fe420202",
"operator": {
"type": "boolean",
"operation": "false",
"singleValue": true
},
"leftValue": "={{ Boolean(($json.hashes ?? []).includes($json.id)) }}",
"rightValue": "=false"
}
]
}
},
"typeVersion": 2
},
{
"id": "46acb0de-1df1-4116-8aaf-704ec6644d7c",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1780,
80
],
"parameters": {
"color": 7,
"width": 530.6864600881105,
"height": 578.3950618708791,
"content": "## 3. Use AI to Generate Ticket Contents\n[Read more about using Basic LLM Chain](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm)\n\nFor this demo, we've instructed the AI to do the following:\n* Generate a descriptive title of the issue\n* Summarise the user message into an actionable request.\n* Determine a prority based on tone and context of the user message. \n* Can offer possible fixes through use of tools or RAG. (not implemented)\n"
},
"typeVersion": 1
},
{
"id": "503d4ae7-9d5b-4dab-94a2-da28bc0e49da",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
200,
120
],
"parameters": {
"width": 359.6648027457353,
"height": 400.4748439127683,
"content": "## Try It Out!\n### This workflow does the following:\n* Monitors a Slack channel for new user messages asking for assistance\n* Only user messages which are tagged with the ticket(🎫) emoji are processed.\n* Linear is first checked to see if a ticket was created for the user message.\n* User messages are sent to ChatGPT to generate title, description and priority.\n* Support ticket is created in Linear.\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Hacking!"
},
"typeVersion": 1
},
{
"id": "11e423a4-36b6-4ecd-8bf7-58a7d4a1aa9a",
"name": "Get Existing Issues",
"type": "n8n-nodes-base.linear",
"position": [
1260,
360
],
"parameters": {
"operation": "getAll"
},
"credentials": {
"linearApi": {
"id": "Nn0F7T9FtvRUtEbe",
"name": "Linear account"
}
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "413fde96-346a-468e-80b7-d465bd8add14",
"name": "Generate Ticket Using ChatGPT",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
1920,
320
],
"parameters": {
"text": "=The \"user issue\" is enclosed by 3 backticks:\n```\n{{ $('Get Values').item.json.message }}\n```\nYou will complete the following 4 tasks:\n1. Generate a title intended for a support ticket based on the user issue only. Be descriptive but use no more than 10 words.\n2. Summarise the user issue only by identifying the key expectations and steps that were taken to reach the conclusion.\n3. Offer at most 3 suggestions to debug or resolve the user issue only. ignore the previous issues for this task.\n4. Identify the urgency of the user issue only and denote the priority as one of \"low\", \"medium\", \"high\" or \"urgent\". If you cannot determine the urgency of the issue, then assign the \"low\" priority. Also consider that requests which require action either today or tomorrow should be prioritised as \"high\".",
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.4
},
{
"id": "66aecf53-6e8a-4ee8-88c3-be6b7d8d0527",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
2340,
206
],
"parameters": {
"color": 7,
"width": 374.7406065828194,
"height": 352.3865785298774,
"content": "## 4. Create New Ticket in Linear\n[Read more about using Linear](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.linear)\n\nWith our ticket contents generated, we can now create our ticket in Linear for support to handle.\n"
},
"typeVersion": 1
},
{
"id": "f7898b7b-f60a-4315-a870-8c8ec4ad848f",
"name": "Create Ticket",
"type": "n8n-nodes-base.linear",
"position": [
2480,
380
],
"parameters": {
"title": "={{ $json.output.title }}",
"teamId": "1c721608-321d-4132-ac32-6e92d04bb487",
"additionalFields": {
"stateId": "92962324-3d1f-4cf8-993b-0c982cc95245",
"priorityId": "={{ { 'urgent': 1, 'high': 2, 'medium': 3, 'low': 4 }[$json.output.priority.toLowerCase()] ?? 0 }}",
"description": "=## {{ $json.output.summary }}\n\n### Suggestions\n{{ $json.output.ideas.map(idea => '* ' + idea).join('\\n') }}\n\n## Original Message\n{{ $('Get Values').item.json[\"user\"] }} asks:\n> {{ $('Get Values').item.json[\"message\"] }}\n\n### Metadata\nchannel: {{ $('Get Values').item.json.channel }}\nts: {{ $('Get Values').item.json.ts }}\npermalink: {{ $('Get Values').item.json.permalink }}\nhash: {{ $('Get Values').item.json.id }}\n"
}
},
"credentials": {
"linearApi": {
"id": "Nn0F7T9FtvRUtEbe",
"name": "Linear account"
}
},
"typeVersion": 1
},
{
"id": "0b706c12-6ce0-41af-ad4b-9d98d7d03a41",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
1440,
360
],
"parameters": {
"mode": "combine",
"options": {},
"combinationMode": "multiplex"
},
"typeVersion": 2.1
},
{
"id": "d5b30127-f237-459d-860a-2589e3b54fb8",
"name": "Get Hashes Only",
"type": "n8n-nodes-base.set",
"position": [
1260,
640
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9b0e8527-ea17-4b1e-ba62-287111f4b37e",
"name": "hashes",
"type": "array",
"value": "={{ $json.descriptions.map(desc => desc.match(/hash\\:\\s([\\w#]+)/i)[1]) }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "9de103e1-b6a4-4454-b1b9-73eff730fcb6",
"name": "Collect Descriptions",
"type": "n8n-nodes-base.aggregate",
"position": [
1260,
500
],
"parameters": {
"options": {},
"fieldsToAggregate": {
"fieldToAggregate": [
{
"renameField": true,
"outputFieldName": "descriptions",
"fieldToAggregate": "description"
}
]
}
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "af34916f-7888-4d41-aee6-752b78e88c0c",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
780,
300
],
"parameters": {
"width": 204.96868508214473,
"height": 296.735132421306,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n🚨**Required**\n* Set the Slack channel to monitor here."
},
"typeVersion": 1
},
{
"id": "58ab44f7-5fe5-4804-8bf1-36f351d86528",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
2440,
360
],
"parameters": {
"width": 183.49787916474958,
"height": 296.735132421306,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n🚨**Required**\n* Set the Linear Team Name or ID here."
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Merge": {
"main": [
[
{
"node": "Create New Ticket?",
"type": "main",
"index": 0
}
]
]
},
"Slack": {
"main": [
[
{
"node": "Get Values",
"type": "main",
"index": 0
}
]
]
},
"Get Values": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
},
{
"node": "Get Existing Issues",
"type": "main",
"index": 0
}
]
]
},
"Get Hashes Only": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Slack",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Generate Ticket Using ChatGPT",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Create New Ticket?": {
"main": [
[
{
"node": "Generate Ticket Using ChatGPT",
"type": "main",
"index": 0
}
]
]
},
"Get Existing Issues": {
"main": [
[
{
"node": "Collect Descriptions",
"type": "main",
"index": 0
}
]
]
},
"Collect Descriptions": {
"main": [
[
{
"node": "Get Hashes Only",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Generate Ticket Using ChatGPT",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Generate Ticket Using ChatGPT": {
"main": [
[
{
"node": "Create Ticket",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,697 @@
{
"meta": {
"instanceId": "03e9d14e9196363fe7191ce21dc0bb17387a6e755dcc9acc4f5904752919dca8"
},
"nodes": [
{
"id": "adfda9cb-1d77-4c54-b3ea-e7bf438a48af",
"name": "Parse Webhook",
"type": "n8n-nodes-base.set",
"position": [
760,
640
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "e63f9299-a19d-4ba1-93b0-59f458769fb2",
"name": "response",
"type": "object",
"value": "={{ $json.body.payload }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "b3e0e490-18e0-44b5-a960-0fdbf8422515",
"name": "Qualys Create Report",
"type": "n8n-nodes-base.executeWorkflow",
"position": [
1720,
1740
],
"parameters": {
"options": {},
"workflowId": "icSLX102kSS9zNdK"
},
"typeVersion": 1
},
{
"id": "80ae074b-bda5-4638-b46f-246a1b9530ae",
"name": "Required Report Variables",
"type": "n8n-nodes-base.set",
"position": [
1520,
1740
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "47cd1502-3039-4661-a6b1-e20a74056550",
"name": "report_title",
"type": "string",
"value": "={{ $json.response.view.state.values.report_title.report_title_input.value }}"
},
{
"id": "6a8a0cbf-bf3e-4702-956e-a35966d8b9c5",
"name": "base_url",
"type": "string",
"value": "https://qualysapi.qg3.apps.qualys.com"
},
{
"id": "9a15f4db-f006-4ad8-a2c0-4002dd3e2655",
"name": "output_format",
"type": "string",
"value": "={{ $json.response.view.state.values.output_format.output_format_select.selected_option.value }}"
},
{
"id": "13978e05-7e7f-42e9-8645-d28803db8cc9",
"name": "template_name",
"type": "string",
"value": "={{ $json.response.view.state.values.report_template.report_template_select.selected_option.text.text }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "b596da86-02c7-4d8e-a267-88933f47ae0c",
"name": "Qualys Start Vulnerability Scan",
"type": "n8n-nodes-base.executeWorkflow",
"position": [
1720,
1540
],
"parameters": {
"options": {},
"workflowId": "pYPh5FlGZgb36xZO"
},
"typeVersion": 1
},
{
"id": "61e39516-6558-46ce-a300-b4cbade7a6f6",
"name": "Scan Report Task Modal",
"type": "n8n-nodes-base.httpRequest",
"position": [
1620,
720
],
"parameters": {
"url": "https://slack.com/api/views.open",
"method": "POST",
"options": {},
"jsonBody": "= {\n \"trigger_id\": \"{{ $('Parse Webhook').item.json['response']['trigger_id'] }}\",\n \"external_id\": \"Scan Report Generator\",\n \"view\": {\n\t\"title\": {\n\t\t\"type\": \"plain_text\",\n\t\t\"text\": \"Scan Report Generator\",\n\t\t\"emoji\": true\n\t},\n\t\"submit\": {\n\t\t\"type\": \"plain_text\",\n\t\t\"text\": \"Generate Report\",\n\t\t\"emoji\": true\n\t},\n\t\"type\": \"modal\",\n\t\"close\": {\n\t\t\"type\": \"plain_text\",\n\t\t\"text\": \"Cancel\",\n\t\t\"emoji\": true\n\t},\n\t\"blocks\": [\n\t\t{\n\t\t\t\"type\": \"image\",\n\t\t\t\"image_url\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/2/26/Logo-Qualys.svg/300px-Logo-Qualys.svg.png\",\n\t\t\t\"alt_text\": \"Qualys Logo\"\n\t\t},\n\t\t{\n\t\t\t\"type\": \"section\",\n\t\t\t\"text\": {\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"Select a template and generate a detailed scan report based on the results of your previous scans.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"input\",\n\t\t\t\"block_id\": \"report_template\",\n\t\t\t\"element\": {\n\t\t\t\t\"type\": \"external_select\",\n\t\t\t\t\"placeholder\": {\n\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\"text\": \"Select a report template\",\n\t\t\t\t\t\"emoji\": true\n\t\t\t\t},\n\t\t\t\t\"action_id\": \"report_template_select\"\n\t\t\t},\n\t\t\t\"label\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Report Template\",\n\t\t\t\t\"emoji\": true\n\t\t\t},\n\t\t\t\"hint\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Choose a report template from your Qualys account to structure the output.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"input\",\n\t\t\t\"block_id\": \"report_title\",\n\t\t\t\"element\": {\n\t\t\t\t\"type\": \"plain_text_input\",\n\t\t\t\t\"action_id\": \"report_title_input\",\n\t\t\t\t\"placeholder\": {\n\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\"text\": \"Enter a custom title for the report\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"label\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Report Title\",\n\t\t\t\t\"emoji\": true\n\t\t\t},\n\t\t\t\"hint\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Provide a descriptive title for your report. This title will be used in the report header.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"input\",\n\t\t\t\"block_id\": \"output_format\",\n\t\t\t\"element\": {\n\t\t\t\t\"type\": \"static_select\",\n\t\t\t\t\"placeholder\": {\n\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\"text\": \"Select output format\",\n\t\t\t\t\t\"emoji\": true\n\t\t\t\t},\n\t\t\t\t\"options\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"text\": {\n\t\t\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\t\t\"text\": \"PDF\",\n\t\t\t\t\t\t\t\"emoji\": true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"value\": \"pdf\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"text\": {\n\t\t\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\t\t\"text\": \"HTML\",\n\t\t\t\t\t\t\t\"emoji\": true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"value\": \"html\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"text\": {\n\t\t\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\t\t\"text\": \"CSV\",\n\t\t\t\t\t\t\t\"emoji\": true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"value\": \"csv\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"action_id\": \"output_format_select\"\n\t\t\t},\n\t\t\t\"label\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Output Format\",\n\t\t\t\t\"emoji\": true\n\t\t\t},\n\t\t\t\"hint\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Choose the format in which you want the report to be generated.\"\n\t\t\t}\n\t\t}\n\t]\n}\n}",
"sendBody": true,
"jsonQuery": "{\n \"Content-type\": \"application/json\"\n}",
"sendQuery": true,
"specifyBody": "json",
"specifyQuery": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "slackApi"
},
"credentials": {
"slackApi": {
"id": "DZJDes1ZtGpqClNk",
"name": "Qualys Slack App"
}
},
"typeVersion": 4.2
},
{
"id": "29cf716c-9cd6-4bd9-a0f9-c75baca86cc1",
"name": "Vuln Scan Modal",
"type": "n8n-nodes-base.httpRequest",
"position": [
1620,
560
],
"parameters": {
"url": "https://slack.com/api/views.open",
"method": "POST",
"options": {},
"jsonBody": "= {\n \"trigger_id\": \"{{ $('Parse Webhook').item.json['response']['trigger_id'] }}\",\n \"external_id\": \"Scan Report Generator\",\n \"view\": {\n\t\"title\": {\n\t\t\"type\": \"plain_text\",\n\t\t\"text\": \"Vulnerability Scan\",\n\t\t\"emoji\": true\n\t},\n\t\"submit\": {\n\t\t\"type\": \"plain_text\",\n\t\t\"text\": \"Execute Scan\",\n\t\t\"emoji\": true\n\t},\n\t\"type\": \"modal\",\n\t\"close\": {\n\t\t\"type\": \"plain_text\",\n\t\t\"text\": \"Cancel\",\n\t\t\"emoji\": true\n\t},\n\t\"blocks\": [\n\t\t{\n\t\t\t\"type\": \"image\",\n\t\t\t\"image_url\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/2/26/Logo-Qualys.svg/300px-Logo-Qualys.svg.png\",\n\t\t\t\"alt_text\": \"Qualys Logo\"\n\t\t},\n\t\t{\n\t\t\t\"type\": \"section\",\n\t\t\t\"text\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Initiate a network-wide scan to detect and assess security vulnerabilities.\",\n\t\t\t\t\"emoji\": true\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"input\",\n\t\t\t\"block_id\": \"option_title\",\n\t\t\t\"element\": {\n\t\t\t\t\"type\": \"plain_text_input\",\n\t\t\t\t\"action_id\": \"text_input-action\",\n\t\t\t\t\"initial_value\": \"Initial Options\"\n\t\t\t},\n\t\t\t\"label\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Option Title\",\n\t\t\t\t\"emoji\": true\n\t\t\t},\n\t\t\t\"hint\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Specify the title of the option profile to use for the scan.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"input\",\n\t\t\t\"block_id\": \"scan_title\",\n\t\t\t\"element\": {\n\t\t\t\t\"type\": \"plain_text_input\",\n\t\t\t\t\"action_id\": \"text_input-action\",\n\t\t\t\t\"placeholder\": {\n\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\"text\": \"Enter your scan title\"\n\t\t\t\t},\n\t\t\t\t\"initial_value\": \"n8n Scan 1\"\n\t\t\t},\n\t\t\t\"label\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Scan Title\",\n\t\t\t\t\"emoji\": true\n\t\t\t},\n\t\t\t\"hint\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Provide a descriptive title for the scan. Up to 2000 characters.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"input\",\n\t\t\t\"block_id\": \"asset_groups\",\n\t\t\t\"element\": {\n\t\t\t\t\"type\": \"plain_text_input\",\n\t\t\t\t\"action_id\": \"text_input-action\",\n\t\t\t\t\"placeholder\": {\n\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\"text\": \"Enter asset groups\"\n\t\t\t\t},\n\t\t\t\t\"initial_value\": \"Group1\"\n\t\t\t},\n\t\t\t\"label\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Asset Groups\",\n\t\t\t\t\"emoji\": true\n\t\t\t},\n\t\t\t\"hint\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Specify asset group titles for targeting. Multiple titles must be comma-separated.\"\n\t\t\t}\n\t\t}\n\t]\n}\n}",
"sendBody": true,
"jsonQuery": "{\n \"Content-type\": \"application/json\"\n}",
"sendQuery": true,
"specifyBody": "json",
"specifyQuery": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "slackApi"
},
"credentials": {
"slackApi": {
"id": "DZJDes1ZtGpqClNk",
"name": "Qualys Slack App"
}
},
"typeVersion": 4.2
},
{
"id": "a771704d-4191-4e80-b62f-81b41b047a87",
"name": "Route Message",
"type": "n8n-nodes-base.switch",
"position": [
940,
640
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Vuln Scan Modal",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.response.callback_id }}",
"rightValue": "trigger-qualys-vmscan"
}
]
},
"renameOutput": true
},
{
"outputKey": "Scan Report Modal",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "02868fd8-2577-4c6d-af5e-a1963cb2f786",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.response.callback_id }}",
"rightValue": "qualys-scan-report"
}
]
},
"renameOutput": true
},
{
"outputKey": "Process Submission",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c320c8b8-947b-433a-be82-d2aa96594808",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.response.type }}",
"rightValue": "view_submission"
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "none"
}
},
"typeVersion": 3
},
{
"id": "c8346d57-762a-4bbd-8d2b-f13097cb063d",
"name": "Required Scan Variables",
"type": "n8n-nodes-base.set",
"position": [
1520,
1540
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "096ff32e-356e-4a85-aad2-01001d69dd46",
"name": "platformurl",
"type": "string",
"value": "https://qualysapi.qg3.apps.qualys.com"
},
{
"id": "070178a6-73b0-458b-8657-20ab4ff0485c",
"name": "option_title",
"type": "string",
"value": "={{ $json.response.view.state.values.option_title['text_input-action'].value }}"
},
{
"id": "3605424b-5bfc-44f0-b6e4-e0d6b1130b8e",
"name": "scan_title",
"type": "string",
"value": "={{ $json.response.view.state.values.scan_title['text_input-action'].value }}"
},
{
"id": "2320d966-b834-46fb-b674-be97cc08682e",
"name": "asset_groups",
"type": "string",
"value": "={{ $json.response.view.state.values.asset_groups['text_input-action'].value }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "55589da9-50ce-4d55-a5ff-d62abdf65fa4",
"name": "Route Submission",
"type": "n8n-nodes-base.switch",
"position": [
1240,
1140
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Vuln Scan",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.response.view.title.text }}",
"rightValue": "Vulnerability Scan"
}
]
},
"renameOutput": true
},
{
"outputKey": "Scan Report",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "02868fd8-2577-4c6d-af5e-a1963cb2f786",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.response.view.title.text }}",
"rightValue": "Scan Report Generator"
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "none"
}
},
"typeVersion": 3
},
{
"id": "d0fc264d-0c48-4aa6-aeab-ed605d96f35a",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
428.3467548314237,
270.6382978723399
],
"parameters": {
"color": 7,
"width": 466.8168310000617,
"height": 567.6433222116042,
"content": "![Imgur](https://uploads.n8n.io/templates/slack.png)\n## Events Webhook Trigger\nThe first node receives all messages from Slack API via Subscription Events API. You can find more information about setting up the subscription events API by [clicking here](https://api.slack.com/apis/connections/events-api). \n\nThe second node extracts the payload from slack into an object that n8n can understand. "
},
"typeVersion": 1
},
{
"id": "acb3fbdc-1fcb-4763-8529-ea2842607569",
"name": "Sticky Note15",
"type": "n8n-nodes-base.stickyNote",
"position": [
900,
-32.762682645579616
],
"parameters": {
"color": 7,
"width": 566.0553219408072,
"height": 1390.6748140207737,
"content": "![n8n](https://uploads.n8n.io/templates/n8n.png)\n## Efficient Slack Interaction Handling with n8n\n\nThis section of the workflow is designed to efficiently manage and route messages and submissions from Slack based on specific triggers and conditions. When a Slack interaction occurs—such as a user triggering a vulnerability scan or generating a report through a modal—the workflow intelligently routes the message to the appropriate action:\n\n- **Dynamic Routing**: Uses conditions to determine the nature of the Slack interaction, whether it's a direct command to initiate a scan or a request to generate a report.\n- **Modal Management**: Differentiates actions based on modal titles and `callback_id`s, ensuring that each type of submission is processed according to its context.\n- **Streamlined Responses**: After routing, the workflow promptly handles the necessary responses or actions, including closing modal popups and responding to Slack with appropriate confirmation or data.\n\n**Purpose**: This mechanism ensures that all interactions within Slack are handled quickly and accurately, automating responses and actions in real-time to enhance user experience and workflow efficiency."
},
"typeVersion": 1
},
{
"id": "85f370e8-70d2-466e-8f44-45eaf04a0d95",
"name": "Sticky Note11",
"type": "n8n-nodes-base.stickyNote",
"position": [
1473.6255461332685,
56.17183602125283
],
"parameters": {
"color": 7,
"width": 396.6025898621133,
"height": 881.1659905894905,
"content": "![Imgur](https://uploads.n8n.io/templates/slack.png)\n## Display Modal Popup\nThis section pops open a modal window that is later used to send data into TheHive. \n\nModals can be customized to perform all sorts of actions. And they are natively mobile! You can see a screenshot of the Slack Modals on the right. \n\nLearn more about them by [clicking here](https://api.slack.com/surfaces/modals)"
},
"typeVersion": 1
},
{
"id": "cae79c1c-47f8-41c0-b1d0-e284359b52a8",
"name": "Sticky Note12",
"type": "n8n-nodes-base.stickyNote",
"position": [
1480,
960
],
"parameters": {
"color": 7,
"width": 390.82613196003143,
"height": 950.1640646001949,
"content": "![Imgur](https://i.imgur.com/abGF8EO.png)\n## Modal Submission Payload\nThe data input into the Slack Modal makes its way into these set nodes that then pass that data into the Qualys Sub workflows that handle the heavy lifting. \n\n### Two Trigger Options\n- **Trigger a Vulnerability Scan** in the Slack UI which then sends a slack message to a channel of your choice summarizing and linking to the scan in slack\n- **Trigger report creation** in the Slack UI from the previously generated Vulnerability scan and upload a PDF copy of the report directly in a slack channel of your choice"
},
"typeVersion": 1
},
{
"id": "1017df8b-ff32-47aa-a4c2-a026e6597fa9",
"name": "Close Modal Popup",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1000,
1140
],
"parameters": {
"options": {
"responseCode": 204
},
"respondWith": "noData"
},
"typeVersion": 1.1
},
{
"id": "6b058f2a-2c0c-4326-aa42-08d840e306f7",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-260,
280
],
"parameters": {
"width": 675.1724774900403,
"height": 972.8853473866498,
"content": "![n8n](https://uploads.n8n.io/templates/n8n.png)\n## Enhance Security Operations with the Qualys Slack Shortcut Bot!\n\nOur **Qualys Slack Shortcut Bot** is strategically designed to facilitate immediate security operations directly from Slack. This powerful tool allows users to initiate vulnerability scans and generate detailed reports through simple Slack interactions, streamlining the process of managing security assessments.\n\n**Workflow Highlights:**\n- **Interactive Modals**: Utilizes Slack modals to gather user inputs for scan configurations and report generation, providing a user-friendly interface for complex operations.\n- **Dynamic Workflow Execution**: Integrates seamlessly with Qualys to execute vulnerability scans and create reports based on user-specified parameters.\n- **Real-Time Feedback**: Offers instant feedback within Slack, updating users about the status of their requests and delivering reports directly through Slack channels.\n\n\n**Operational Flow:**\n- **Parse Webhook Data**: Captures and parses incoming data from Slack to understand user commands accurately.\n- **Execute Actions**: Depending on the user's selection, the workflow triggers other sub-workflows like 'Qualys Start Vulnerability Scan' or 'Qualys Create Report' for detailed processing.\n- **Respond to Slack**: Ensures that every interaction is acknowledged, maintaining a smooth user experience by managing modal popups and sending appropriate responses.\n\n\n**Setup Instructions:**\n- Verify that Slack and Qualys API integrations are correctly configured for seamless interaction.\n- Customize the modal interfaces to align with your organization's operational protocols and security policies.\n- Test the workflow to ensure that it responds accurately to Slack commands and that the integration with Qualys is functioning as expected.\n\n\n**Need Assistance?**\n- Explore our [Documentation](https://docs.qualys.com) or get help from the [n8n Community](https://community.n8n.io) for more detailed guidance on setup and customization.\n\nDeploy this bot within your Slack environment to significantly enhance the efficiency and responsiveness of your security operations, enabling proactive management of vulnerabilities and streamlined reporting."
},
"typeVersion": 1
},
{
"id": "63b537e8-50c9-479d-96a4-54e621689a23",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
520,
640
],
"webhookId": "4f86c00d-ceb4-4890-84c5-850f8e5dec05",
"parameters": {
"path": "4f86c00d-ceb4-4890-84c5-850f8e5dec05",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "13500444-f2ff-4b77-8f41-8ac52d067ec7",
"name": "Respond to Slack Webhook - Vulnerability",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1280,
560
],
"parameters": {
"options": {},
"respondWith": "noData"
},
"typeVersion": 1.1
},
{
"id": "e64cedf0-948c-43c8-a62c-d0ec2916f3b6",
"name": "Respond to Slack Webhook - Report",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1280,
720
],
"parameters": {
"options": {
"responseCode": 200
},
"respondWith": "noData"
},
"typeVersion": 1.1
},
{
"id": "d2e53f7b-090a-4330-949d-d66ac0e5849c",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1494.8207799250774,
1400
],
"parameters": {
"color": 5,
"width": 361.46312518523973,
"height": 113.6416448104651,
"content": "### 🙋 Remember to update your Slack Channels\nDon't forget to update the Slack Channels in the Slack nodes in these two subworkflows. \n"
},
"typeVersion": 1
},
{
"id": "2731f910-288f-497a-a71d-d840a63b2930",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1480,
400
],
"parameters": {
"color": 5,
"width": 376.26546828439086,
"height": 113.6416448104651,
"content": "### 🙋 Don't forget your slack credentials!\nThankfully n8n makes it easy, as long as you've added credentials to a normal slack node, these http nodes are a snap to change via the drop down. "
},
"typeVersion": 1
},
{
"id": "72105959-ee9b-4ce6-a7f8-0f5f112c14d2",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1880,
500
],
"parameters": {
"color": 5,
"width": 532.5097590794944,
"height": 671.013686767174,
"content": "![Imgur](https://uploads.n8n.io/templates/qualysscanreport.png)"
},
"typeVersion": 1
},
{
"id": "49b8ce63-cefd-483a-b802-03e3500d807b",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1880,
-200
],
"parameters": {
"color": 5,
"width": 535.8333316661616,
"height": 658.907292269235,
"content": "![Imgur](https://uploads.n8n.io/templates/qualysmodalscan.png)"
},
"typeVersion": 1
},
{
"id": "3ec8c799-d5a5-4134-891a-59adb3e68e23",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
280,
-158.042446016207
],
"parameters": {
"color": 5,
"width": 596.6847639718076,
"height": 422.00743613240917,
"content": "![Imgur](https://uploads.n8n.io/templates/qualysscanshortcut.png)\n### 🤖 Triggering this workflow is as easy as typing a backslash in Slack"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Webhook": {
"main": [
[
{
"node": "Parse Webhook",
"type": "main",
"index": 0
}
]
]
},
"Parse Webhook": {
"main": [
[
{
"node": "Route Message",
"type": "main",
"index": 0
}
]
]
},
"Route Message": {
"main": [
[
{
"node": "Respond to Slack Webhook - Vulnerability",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond to Slack Webhook - Report",
"type": "main",
"index": 0
}
],
[
{
"node": "Close Modal Popup",
"type": "main",
"index": 0
}
]
]
},
"Route Submission": {
"main": [
[
{
"node": "Required Scan Variables",
"type": "main",
"index": 0
}
],
[
{
"node": "Required Report Variables",
"type": "main",
"index": 0
}
]
]
},
"Close Modal Popup": {
"main": [
[
{
"node": "Route Submission",
"type": "main",
"index": 0
}
]
]
},
"Required Scan Variables": {
"main": [
[
{
"node": "Qualys Start Vulnerability Scan",
"type": "main",
"index": 0
}
]
]
},
"Required Report Variables": {
"main": [
[
{
"node": "Qualys Create Report",
"type": "main",
"index": 0
}
]
]
},
"Respond to Slack Webhook - Report": {
"main": [
[
{
"node": "Scan Report Task Modal",
"type": "main",
"index": 0
}
]
]
},
"Respond to Slack Webhook - Vulnerability": {
"main": [
[
{
"node": "Vuln Scan Modal",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,697 @@
{
"meta": {
"instanceId": "03e9d14e9196363fe7191ce21dc0bb17387a6e755dcc9acc4f5904752919dca8"
},
"nodes": [
{
"id": "adfda9cb-1d77-4c54-b3ea-e7bf438a48af",
"name": "Parse Webhook",
"type": "n8n-nodes-base.set",
"position": [
760,
640
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "e63f9299-a19d-4ba1-93b0-59f458769fb2",
"name": "response",
"type": "object",
"value": "={{ $json.body.payload }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "b3e0e490-18e0-44b5-a960-0fdbf8422515",
"name": "Qualys Create Report",
"type": "n8n-nodes-base.executeWorkflow",
"position": [
1720,
1740
],
"parameters": {
"options": {},
"workflowId": "icSLX102kSS9zNdK"
},
"typeVersion": 1
},
{
"id": "80ae074b-bda5-4638-b46f-246a1b9530ae",
"name": "Required Report Variables",
"type": "n8n-nodes-base.set",
"position": [
1520,
1740
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "47cd1502-3039-4661-a6b1-e20a74056550",
"name": "report_title",
"type": "string",
"value": "={{ $json.response.view.state.values.report_title.report_title_input.value }}"
},
{
"id": "6a8a0cbf-bf3e-4702-956e-a35966d8b9c5",
"name": "base_url",
"type": "string",
"value": "https://qualysapi.qg3.apps.qualys.com"
},
{
"id": "9a15f4db-f006-4ad8-a2c0-4002dd3e2655",
"name": "output_format",
"type": "string",
"value": "={{ $json.response.view.state.values.output_format.output_format_select.selected_option.value }}"
},
{
"id": "13978e05-7e7f-42e9-8645-d28803db8cc9",
"name": "template_name",
"type": "string",
"value": "={{ $json.response.view.state.values.report_template.report_template_select.selected_option.text.text }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "b596da86-02c7-4d8e-a267-88933f47ae0c",
"name": "Qualys Start Vulnerability Scan",
"type": "n8n-nodes-base.executeWorkflow",
"position": [
1720,
1540
],
"parameters": {
"options": {},
"workflowId": "pYPh5FlGZgb36xZO"
},
"typeVersion": 1
},
{
"id": "61e39516-6558-46ce-a300-b4cbade7a6f6",
"name": "Scan Report Task Modal",
"type": "n8n-nodes-base.httpRequest",
"position": [
1620,
720
],
"parameters": {
"url": "https://slack.com/api/views.open",
"method": "POST",
"options": {},
"jsonBody": "= {\n \"trigger_id\": \"{{ $('Parse Webhook').item.json['response']['trigger_id'] }}\",\n \"external_id\": \"Scan Report Generator\",\n \"view\": {\n\t\"title\": {\n\t\t\"type\": \"plain_text\",\n\t\t\"text\": \"Scan Report Generator\",\n\t\t\"emoji\": true\n\t},\n\t\"submit\": {\n\t\t\"type\": \"plain_text\",\n\t\t\"text\": \"Generate Report\",\n\t\t\"emoji\": true\n\t},\n\t\"type\": \"modal\",\n\t\"close\": {\n\t\t\"type\": \"plain_text\",\n\t\t\"text\": \"Cancel\",\n\t\t\"emoji\": true\n\t},\n\t\"blocks\": [\n\t\t{\n\t\t\t\"type\": \"image\",\n\t\t\t\"image_url\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/2/26/Logo-Qualys.svg/300px-Logo-Qualys.svg.png\",\n\t\t\t\"alt_text\": \"Qualys Logo\"\n\t\t},\n\t\t{\n\t\t\t\"type\": \"section\",\n\t\t\t\"text\": {\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"Select a template and generate a detailed scan report based on the results of your previous scans.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"input\",\n\t\t\t\"block_id\": \"report_template\",\n\t\t\t\"element\": {\n\t\t\t\t\"type\": \"external_select\",\n\t\t\t\t\"placeholder\": {\n\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\"text\": \"Select a report template\",\n\t\t\t\t\t\"emoji\": true\n\t\t\t\t},\n\t\t\t\t\"action_id\": \"report_template_select\"\n\t\t\t},\n\t\t\t\"label\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Report Template\",\n\t\t\t\t\"emoji\": true\n\t\t\t},\n\t\t\t\"hint\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Choose a report template from your Qualys account to structure the output.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"input\",\n\t\t\t\"block_id\": \"report_title\",\n\t\t\t\"element\": {\n\t\t\t\t\"type\": \"plain_text_input\",\n\t\t\t\t\"action_id\": \"report_title_input\",\n\t\t\t\t\"placeholder\": {\n\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\"text\": \"Enter a custom title for the report\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"label\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Report Title\",\n\t\t\t\t\"emoji\": true\n\t\t\t},\n\t\t\t\"hint\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Provide a descriptive title for your report. This title will be used in the report header.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"input\",\n\t\t\t\"block_id\": \"output_format\",\n\t\t\t\"element\": {\n\t\t\t\t\"type\": \"static_select\",\n\t\t\t\t\"placeholder\": {\n\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\"text\": \"Select output format\",\n\t\t\t\t\t\"emoji\": true\n\t\t\t\t},\n\t\t\t\t\"options\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"text\": {\n\t\t\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\t\t\"text\": \"PDF\",\n\t\t\t\t\t\t\t\"emoji\": true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"value\": \"pdf\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"text\": {\n\t\t\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\t\t\"text\": \"HTML\",\n\t\t\t\t\t\t\t\"emoji\": true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"value\": \"html\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"text\": {\n\t\t\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\t\t\"text\": \"CSV\",\n\t\t\t\t\t\t\t\"emoji\": true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"value\": \"csv\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"action_id\": \"output_format_select\"\n\t\t\t},\n\t\t\t\"label\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Output Format\",\n\t\t\t\t\"emoji\": true\n\t\t\t},\n\t\t\t\"hint\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Choose the format in which you want the report to be generated.\"\n\t\t\t}\n\t\t}\n\t]\n}\n}",
"sendBody": true,
"jsonQuery": "{\n \"Content-type\": \"application/json\"\n}",
"sendQuery": true,
"specifyBody": "json",
"specifyQuery": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "slackApi"
},
"credentials": {
"slackApi": {
"id": "DZJDes1ZtGpqClNk",
"name": "Qualys Slack App"
}
},
"typeVersion": 4.2
},
{
"id": "29cf716c-9cd6-4bd9-a0f9-c75baca86cc1",
"name": "Vuln Scan Modal",
"type": "n8n-nodes-base.httpRequest",
"position": [
1620,
560
],
"parameters": {
"url": "https://slack.com/api/views.open",
"method": "POST",
"options": {},
"jsonBody": "= {\n \"trigger_id\": \"{{ $('Parse Webhook').item.json['response']['trigger_id'] }}\",\n \"external_id\": \"Scan Report Generator\",\n \"view\": {\n\t\"title\": {\n\t\t\"type\": \"plain_text\",\n\t\t\"text\": \"Vulnerability Scan\",\n\t\t\"emoji\": true\n\t},\n\t\"submit\": {\n\t\t\"type\": \"plain_text\",\n\t\t\"text\": \"Execute Scan\",\n\t\t\"emoji\": true\n\t},\n\t\"type\": \"modal\",\n\t\"close\": {\n\t\t\"type\": \"plain_text\",\n\t\t\"text\": \"Cancel\",\n\t\t\"emoji\": true\n\t},\n\t\"blocks\": [\n\t\t{\n\t\t\t\"type\": \"image\",\n\t\t\t\"image_url\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/2/26/Logo-Qualys.svg/300px-Logo-Qualys.svg.png\",\n\t\t\t\"alt_text\": \"Qualys Logo\"\n\t\t},\n\t\t{\n\t\t\t\"type\": \"section\",\n\t\t\t\"text\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Initiate a network-wide scan to detect and assess security vulnerabilities.\",\n\t\t\t\t\"emoji\": true\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"input\",\n\t\t\t\"block_id\": \"option_title\",\n\t\t\t\"element\": {\n\t\t\t\t\"type\": \"plain_text_input\",\n\t\t\t\t\"action_id\": \"text_input-action\",\n\t\t\t\t\"initial_value\": \"Initial Options\"\n\t\t\t},\n\t\t\t\"label\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Option Title\",\n\t\t\t\t\"emoji\": true\n\t\t\t},\n\t\t\t\"hint\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Specify the title of the option profile to use for the scan.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"input\",\n\t\t\t\"block_id\": \"scan_title\",\n\t\t\t\"element\": {\n\t\t\t\t\"type\": \"plain_text_input\",\n\t\t\t\t\"action_id\": \"text_input-action\",\n\t\t\t\t\"placeholder\": {\n\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\"text\": \"Enter your scan title\"\n\t\t\t\t},\n\t\t\t\t\"initial_value\": \"n8n Scan 1\"\n\t\t\t},\n\t\t\t\"label\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Scan Title\",\n\t\t\t\t\"emoji\": true\n\t\t\t},\n\t\t\t\"hint\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Provide a descriptive title for the scan. Up to 2000 characters.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"input\",\n\t\t\t\"block_id\": \"asset_groups\",\n\t\t\t\"element\": {\n\t\t\t\t\"type\": \"plain_text_input\",\n\t\t\t\t\"action_id\": \"text_input-action\",\n\t\t\t\t\"placeholder\": {\n\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\"text\": \"Enter asset groups\"\n\t\t\t\t},\n\t\t\t\t\"initial_value\": \"Group1\"\n\t\t\t},\n\t\t\t\"label\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Asset Groups\",\n\t\t\t\t\"emoji\": true\n\t\t\t},\n\t\t\t\"hint\": {\n\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\"text\": \"Specify asset group titles for targeting. Multiple titles must be comma-separated.\"\n\t\t\t}\n\t\t}\n\t]\n}\n}",
"sendBody": true,
"jsonQuery": "{\n \"Content-type\": \"application/json\"\n}",
"sendQuery": true,
"specifyBody": "json",
"specifyQuery": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "slackApi"
},
"credentials": {
"slackApi": {
"id": "DZJDes1ZtGpqClNk",
"name": "Qualys Slack App"
}
},
"typeVersion": 4.2
},
{
"id": "a771704d-4191-4e80-b62f-81b41b047a87",
"name": "Route Message",
"type": "n8n-nodes-base.switch",
"position": [
940,
640
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Vuln Scan Modal",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.response.callback_id }}",
"rightValue": "trigger-qualys-vmscan"
}
]
},
"renameOutput": true
},
{
"outputKey": "Scan Report Modal",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "02868fd8-2577-4c6d-af5e-a1963cb2f786",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.response.callback_id }}",
"rightValue": "qualys-scan-report"
}
]
},
"renameOutput": true
},
{
"outputKey": "Process Submission",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c320c8b8-947b-433a-be82-d2aa96594808",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.response.type }}",
"rightValue": "view_submission"
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "none"
}
},
"typeVersion": 3
},
{
"id": "c8346d57-762a-4bbd-8d2b-f13097cb063d",
"name": "Required Scan Variables",
"type": "n8n-nodes-base.set",
"position": [
1520,
1540
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "096ff32e-356e-4a85-aad2-01001d69dd46",
"name": "platformurl",
"type": "string",
"value": "https://qualysapi.qg3.apps.qualys.com"
},
{
"id": "070178a6-73b0-458b-8657-20ab4ff0485c",
"name": "option_title",
"type": "string",
"value": "={{ $json.response.view.state.values.option_title['text_input-action'].value }}"
},
{
"id": "3605424b-5bfc-44f0-b6e4-e0d6b1130b8e",
"name": "scan_title",
"type": "string",
"value": "={{ $json.response.view.state.values.scan_title['text_input-action'].value }}"
},
{
"id": "2320d966-b834-46fb-b674-be97cc08682e",
"name": "asset_groups",
"type": "string",
"value": "={{ $json.response.view.state.values.asset_groups['text_input-action'].value }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "55589da9-50ce-4d55-a5ff-d62abdf65fa4",
"name": "Route Submission",
"type": "n8n-nodes-base.switch",
"position": [
1240,
1140
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Vuln Scan",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.response.view.title.text }}",
"rightValue": "Vulnerability Scan"
}
]
},
"renameOutput": true
},
{
"outputKey": "Scan Report",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "02868fd8-2577-4c6d-af5e-a1963cb2f786",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.response.view.title.text }}",
"rightValue": "Scan Report Generator"
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "none"
}
},
"typeVersion": 3
},
{
"id": "d0fc264d-0c48-4aa6-aeab-ed605d96f35a",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
428.3467548314237,
270.6382978723399
],
"parameters": {
"color": 7,
"width": 466.8168310000617,
"height": 567.6433222116042,
"content": "![Imgur](https://uploads.n8n.io/templates/slack.png)\n## Events Webhook Trigger\nThe first node receives all messages from Slack API via Subscription Events API. You can find more information about setting up the subscription events API by [clicking here](https://api.slack.com/apis/connections/events-api). \n\nThe second node extracts the payload from slack into an object that n8n can understand. "
},
"typeVersion": 1
},
{
"id": "acb3fbdc-1fcb-4763-8529-ea2842607569",
"name": "Sticky Note15",
"type": "n8n-nodes-base.stickyNote",
"position": [
900,
-32.762682645579616
],
"parameters": {
"color": 7,
"width": 566.0553219408072,
"height": 1390.6748140207737,
"content": "![n8n](https://uploads.n8n.io/templates/n8n.png)\n## Efficient Slack Interaction Handling with n8n\n\nThis section of the workflow is designed to efficiently manage and route messages and submissions from Slack based on specific triggers and conditions. When a Slack interaction occurs—such as a user triggering a vulnerability scan or generating a report through a modal—the workflow intelligently routes the message to the appropriate action:\n\n- **Dynamic Routing**: Uses conditions to determine the nature of the Slack interaction, whether it's a direct command to initiate a scan or a request to generate a report.\n- **Modal Management**: Differentiates actions based on modal titles and `callback_id`s, ensuring that each type of submission is processed according to its context.\n- **Streamlined Responses**: After routing, the workflow promptly handles the necessary responses or actions, including closing modal popups and responding to Slack with appropriate confirmation or data.\n\n**Purpose**: This mechanism ensures that all interactions within Slack are handled quickly and accurately, automating responses and actions in real-time to enhance user experience and workflow efficiency."
},
"typeVersion": 1
},
{
"id": "85f370e8-70d2-466e-8f44-45eaf04a0d95",
"name": "Sticky Note11",
"type": "n8n-nodes-base.stickyNote",
"position": [
1473.6255461332685,
56.17183602125283
],
"parameters": {
"color": 7,
"width": 396.6025898621133,
"height": 881.1659905894905,
"content": "![Imgur](https://uploads.n8n.io/templates/slack.png)\n## Display Modal Popup\nThis section pops open a modal window that is later used to send data into TheHive. \n\nModals can be customized to perform all sorts of actions. And they are natively mobile! You can see a screenshot of the Slack Modals on the right. \n\nLearn more about them by [clicking here](https://api.slack.com/surfaces/modals)"
},
"typeVersion": 1
},
{
"id": "cae79c1c-47f8-41c0-b1d0-e284359b52a8",
"name": "Sticky Note12",
"type": "n8n-nodes-base.stickyNote",
"position": [
1480,
960
],
"parameters": {
"color": 7,
"width": 390.82613196003143,
"height": 950.1640646001949,
"content": "![Imgur](https://i.imgur.com/abGF8EO.png)\n## Modal Submission Payload\nThe data input into the Slack Modal makes its way into these set nodes that then pass that data into the Qualys Sub workflows that handle the heavy lifting. \n\n### Two Trigger Options\n- **Trigger a Vulnerability Scan** in the Slack UI which then sends a slack message to a channel of your choice summarizing and linking to the scan in slack\n- **Trigger report creation** in the Slack UI from the previously generated Vulnerability scan and upload a PDF copy of the report directly in a slack channel of your choice"
},
"typeVersion": 1
},
{
"id": "1017df8b-ff32-47aa-a4c2-a026e6597fa9",
"name": "Close Modal Popup",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1000,
1140
],
"parameters": {
"options": {
"responseCode": 204
},
"respondWith": "noData"
},
"typeVersion": 1.1
},
{
"id": "6b058f2a-2c0c-4326-aa42-08d840e306f7",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-260,
280
],
"parameters": {
"width": 675.1724774900403,
"height": 972.8853473866498,
"content": "![n8n](https://uploads.n8n.io/templates/n8n.png)\n## Enhance Security Operations with the Qualys Slack Shortcut Bot!\n\nOur **Qualys Slack Shortcut Bot** is strategically designed to facilitate immediate security operations directly from Slack. This powerful tool allows users to initiate vulnerability scans and generate detailed reports through simple Slack interactions, streamlining the process of managing security assessments.\n\n**Workflow Highlights:**\n- **Interactive Modals**: Utilizes Slack modals to gather user inputs for scan configurations and report generation, providing a user-friendly interface for complex operations.\n- **Dynamic Workflow Execution**: Integrates seamlessly with Qualys to execute vulnerability scans and create reports based on user-specified parameters.\n- **Real-Time Feedback**: Offers instant feedback within Slack, updating users about the status of their requests and delivering reports directly through Slack channels.\n\n\n**Operational Flow:**\n- **Parse Webhook Data**: Captures and parses incoming data from Slack to understand user commands accurately.\n- **Execute Actions**: Depending on the user's selection, the workflow triggers other sub-workflows like 'Qualys Start Vulnerability Scan' or 'Qualys Create Report' for detailed processing.\n- **Respond to Slack**: Ensures that every interaction is acknowledged, maintaining a smooth user experience by managing modal popups and sending appropriate responses.\n\n\n**Setup Instructions:**\n- Verify that Slack and Qualys API integrations are correctly configured for seamless interaction.\n- Customize the modal interfaces to align with your organization's operational protocols and security policies.\n- Test the workflow to ensure that it responds accurately to Slack commands and that the integration with Qualys is functioning as expected.\n\n\n**Need Assistance?**\n- Explore our [Documentation](https://docs.qualys.com) or get help from the [n8n Community](https://community.n8n.io) for more detailed guidance on setup and customization.\n\nDeploy this bot within your Slack environment to significantly enhance the efficiency and responsiveness of your security operations, enabling proactive management of vulnerabilities and streamlined reporting."
},
"typeVersion": 1
},
{
"id": "63b537e8-50c9-479d-96a4-54e621689a23",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
520,
640
],
"webhookId": "4f86c00d-ceb4-4890-84c5-850f8e5dec05",
"parameters": {
"path": "4f86c00d-ceb4-4890-84c5-850f8e5dec05",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "13500444-f2ff-4b77-8f41-8ac52d067ec7",
"name": "Respond to Slack Webhook - Vulnerability",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1280,
560
],
"parameters": {
"options": {},
"respondWith": "noData"
},
"typeVersion": 1.1
},
{
"id": "e64cedf0-948c-43c8-a62c-d0ec2916f3b6",
"name": "Respond to Slack Webhook - Report",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1280,
720
],
"parameters": {
"options": {
"responseCode": 200
},
"respondWith": "noData"
},
"typeVersion": 1.1
},
{
"id": "d2e53f7b-090a-4330-949d-d66ac0e5849c",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1494.8207799250774,
1400
],
"parameters": {
"color": 5,
"width": 361.46312518523973,
"height": 113.6416448104651,
"content": "### 🙋 Remember to update your Slack Channels\nDon't forget to update the Slack Channels in the Slack nodes in these two subworkflows. \n"
},
"typeVersion": 1
},
{
"id": "2731f910-288f-497a-a71d-d840a63b2930",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1480,
400
],
"parameters": {
"color": 5,
"width": 376.26546828439086,
"height": 113.6416448104651,
"content": "### 🙋 Don't forget your slack credentials!\nThankfully n8n makes it easy, as long as you've added credentials to a normal slack node, these http nodes are a snap to change via the drop down. "
},
"typeVersion": 1
},
{
"id": "72105959-ee9b-4ce6-a7f8-0f5f112c14d2",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1880,
500
],
"parameters": {
"color": 5,
"width": 532.5097590794944,
"height": 671.013686767174,
"content": "![Imgur](https://uploads.n8n.io/templates/qualysscanreport.png)"
},
"typeVersion": 1
},
{
"id": "49b8ce63-cefd-483a-b802-03e3500d807b",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1880,
-200
],
"parameters": {
"color": 5,
"width": 535.8333316661616,
"height": 658.907292269235,
"content": "![Imgur](https://uploads.n8n.io/templates/qualysmodalscan.png)"
},
"typeVersion": 1
},
{
"id": "3ec8c799-d5a5-4134-891a-59adb3e68e23",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
280,
-158.042446016207
],
"parameters": {
"color": 5,
"width": 596.6847639718076,
"height": 422.00743613240917,
"content": "![Imgur](https://uploads.n8n.io/templates/qualysscanshortcut.png)\n### 🤖 Triggering this workflow is as easy as typing a backslash in Slack"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Webhook": {
"main": [
[
{
"node": "Parse Webhook",
"type": "main",
"index": 0
}
]
]
},
"Parse Webhook": {
"main": [
[
{
"node": "Route Message",
"type": "main",
"index": 0
}
]
]
},
"Route Message": {
"main": [
[
{
"node": "Respond to Slack Webhook - Vulnerability",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond to Slack Webhook - Report",
"type": "main",
"index": 0
}
],
[
{
"node": "Close Modal Popup",
"type": "main",
"index": 0
}
]
]
},
"Route Submission": {
"main": [
[
{
"node": "Required Scan Variables",
"type": "main",
"index": 0
}
],
[
{
"node": "Required Report Variables",
"type": "main",
"index": 0
}
]
]
},
"Close Modal Popup": {
"main": [
[
{
"node": "Route Submission",
"type": "main",
"index": 0
}
]
]
},
"Required Scan Variables": {
"main": [
[
{
"node": "Qualys Start Vulnerability Scan",
"type": "main",
"index": 0
}
]
]
},
"Required Report Variables": {
"main": [
[
{
"node": "Qualys Create Report",
"type": "main",
"index": 0
}
]
]
},
"Respond to Slack Webhook - Report": {
"main": [
[
{
"node": "Scan Report Task Modal",
"type": "main",
"index": 0
}
]
]
},
"Respond to Slack Webhook - Vulnerability": {
"main": [
[
{
"node": "Vuln Scan Modal",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,266 @@
{
"id": "",
"meta": {
"instanceId": "",
"templateCredsSetupCompleted": true
},
"name": "piepdrive-test",
"tags": [],
"nodes": [
{
"id": "b2838678-c796-4c99-a3da-a2cd1b42ea97",
"name": "Pipedrive Trigger - An Organization is created",
"type": "n8n-nodes-base.pipedriveTrigger",
"position": [
820,
380
],
"webhookId": "f5de09a8-6601-4ad5-8bc8-9b3f4b83e997",
"parameters": {
"action": "added",
"object": "organization"
},
"credentials": {
"pipedriveApi": {
"id": "",
"name": "Pipedrive Connection"
}
},
"typeVersion": 1
},
{
"id": "5aa05d79-b2fa-4040-b4ca-cad83adf2798",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-20,
120
],
"parameters": {
"width": 656.3637637842876,
"height": 1455.9537026322007,
"content": "# Enrich Pipedrive's Organization Data with GPT-4o When an Organization is Created in Pipedrive\n\nThis workflow **enriches a Pipedrive organization's data by adding a note to the organization object in Pipedrive**. It assumes there is a custom \"website\" field in your Pipedrive setup, as data will be scraped from this website to generate a note using OpenAI.\n\n## ⚠️ Disclaimer\n**These workflows use a scraping API. Before using it, ensure you comply with the regulations regarding web scraping in your country or state**.\n\n## Important Notes\n- The OpenAI model used is GPT-4o, chosen for its large input token context capacity. However, it is also **the most expensive option**, you should take cost into consideration.\n\n- The system prompt in the OpenAI Node generates output with relevant information, but feel free to improve or **modify it according to your needs**.\n\n## **How It Works**\n\n### Node 1: `Pipedrive Trigger - An Organization is Created`\nThis is the trigger of the workflow. When **an organization object is created in Pipedrive**, this node is triggered and retrieves the data. Make sure you have a \"website\" custom field (the name of the field in the n8n node will appear as a random ID and not with the Pipedrive custom field name).\n\n### Node 2: `ScrapingBee - Get Organization's Website's Homepage Content`\nThis node **scrapes the content** from the URL of the website associated with the **Pipedrive Organization** created in Node 1. The workflow uses the [ScrapingBee](https://www.scrapingbee.com/) API, but you can use any preferred API or simply the HTTP request node in n8n.\n\n### Node 3: `OpenAI - Message GPT-4o with Scraped Data`\nThis node sends HTML-scraped data from the previous node to the **OpenAI GPT-4 model**. The system prompt instructs the model to **extract company data**, such as products or services offered and competitors (if known by the model), and format it as HTML for optimal use in a Pipedrive Note.\n\n### Node 4: `Pipedrive - Create a Note with OpenAI Output`\nThis node **adds a Note to the Organization created in Pipedrive** using the OpenAI node output. The Note will include the company description, target market, selling products, and competitors (if GPT-4 was able to determine them).\n\n### Node 5 & 6: `HTML To Markdown` & `Code - Markdown to Slack Markdown`\nThese two nodes **format the HTML output to Slack Markdown**.\n\nThe Note created in Pipedrive is in HTML format, **as specified by the System Prompt of the OpenAI Node**. To send it to Slack, it needs to be converted to Markdown and then to Slack-specific Markdown.\n\n### Node 7: `Slack - Notify`\nThis node **sends a message in Slack containing the Pipedrive Organization Note** created with this workflow.\n"
},
"typeVersion": 1
},
{
"id": "47ee8bfb-2f9d-4790-a929-1533215d6746",
"name": "Pipedrive - Create a Note with OpenAI output",
"type": "n8n-nodes-base.pipedrive",
"position": [
1640,
380
],
"parameters": {
"content": "={{ $json.message.content }}",
"resource": "note",
"additionalFields": {
"org_id": "={{ $('Pipedrive Trigger - An Organization is created').item.json.meta.id }}"
}
},
"credentials": {
"pipedriveApi": {
"id": "",
"name": "Pipedrive Connection"
}
},
"typeVersion": 1
},
{
"id": "7783b531-0469-4bee-868e-4b26a1bb41ba",
"name": "Code - Markdown to Slack Markdown",
"type": "n8n-nodes-base.code",
"position": [
2080,
380
],
"parameters": {
"jsCode": "const inputMarkdown = items[0].json.data;\n\nfunction convertMarkdownToSlackFormat(markdown) {\n let slackFormatted = markdown;\n \n // Convert headers\n slackFormatted = slackFormatted.replace(/^# (.*$)/gim, '*$1*');\n slackFormatted = slackFormatted.replace(/^## (.*$)/gim, '*$1*');\n \n // Convert unordered lists\n slackFormatted = slackFormatted.replace(/^\\* (.*$)/gim, '➡️ $1');\n \n // Convert tables\n const tableRegex = /\\n\\|.*\\|\\n\\|.*\\|\\n((\\|.*\\|\\n)+)/;\n const tableMatch = slackFormatted.match(tableRegex);\n if (tableMatch) {\n const table = tableMatch[0];\n const rows = table.split('\\n').slice(3, -1);\n const formattedRows = rows.map(row => {\n const columns = row.split('|').slice(1, -1).map(col => col.trim());\n return `*${columns[0]}*: ${columns[1]}`;\n }).join('\\n');\n slackFormatted = slackFormatted.replace(table, formattedRows);\n }\n \n return slackFormatted;\n}\n\nconst slackMarkdown = convertMarkdownToSlackFormat(inputMarkdown);\nconsole.log(slackMarkdown);\n\n// Return data\nreturn [{ slackFormattedMarkdown: slackMarkdown }];\n"
},
"typeVersion": 2
},
{
"id": "cf2b02df-07e8-4ebb-ba3d-bfd294dcfab0",
"name": "Scrapingbee - Get Organization's URL content",
"type": "n8n-nodes-base.httpRequest",
"position": [
1040,
380
],
"parameters": {
"url": "https://app.scrapingbee.com/api/v1",
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "api_key",
"value": "<YOUR_SCRAPINGBEE_API_KEY>"
},
{
"name": "url",
"value": "={{ $json.current.<random_api_id_custom_website_field> }}"
},
{
"name": "render_js",
"value": "false"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "906d44f0-7582-4742-9fd8-4c8dfba918e0",
"name": "HTML To Markdown",
"type": "n8n-nodes-base.markdown",
"position": [
1860,
380
],
"parameters": {
"html": "={{ $json.content }}",
"options": {}
},
"typeVersion": 1
},
{
"id": "8c1a5d64-4f38-4f9e-8878-443f750206b7",
"name": "Slack - Notify ",
"type": "n8n-nodes-base.slack",
"position": [
2300,
380
],
"parameters": {
"text": "=*New Organizaton {{ $('Pipedrive Trigger - An Organization is created').item.json.current.name }} created on Pipedrive* :\n\n\n {{ $json.slackFormattedMarkdown }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultName": "pipedrive-notification"
},
"otherOptions": {},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"id": "",
"name": "Slack Connection"
}
},
"typeVersion": 2.2
},
{
"id": "2414a5d3-1d4b-447b-b401-4b6f823a0cf9",
"name": "OpenAI - Message GPT-4o with Scraped Data",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1260,
380
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "GPT-4O"
},
"options": {},
"messages": {
"values": [
{
"content": "={{ $json.data }}"
},
{
"role": "system",
"content": "You're an assistant that summarizes website content for CRM entries. The user will provide HTML content from a company's website. Your task is to analyze the HTML content and create a concise summary that includes:\n\n1. A brief description of the company's services or products.\n2. Any information about the company's target market or customer base.\n3. Key points about the company's unique selling propositions or competitive advantages.\n4. Based on the provided information, suggest potential competitors if you know any.\n\nFormat your response as HTML.\n\nExample response :\n\n <h1>Company Description</h1>\n <p>Company1 specializes in services related to electric vehicles. The company focuses on providing resources and information about electric car chargers, battery life, different car brands, and the environmental impact of electric vehicles.</p>\n\n <h2>Target Market</h2>\n <p>The target market for Company1 includes electric vehicle owners and potential buyers who are interested in making the shift from traditional fossil fuel vehicles to electric cars. The company also targets environmentally conscious consumers who are looking for sustainable mobility solutions.</p>\n\n <h2>Unique Selling Propositions</h2>\n <ul>\n <li>Comprehensive information about electric vehicle charging solutions, including how to install home charging stations.</li>\n <li>Detailed articles on the advantages of electric vehicles such as ecology and reliability.</li>\n <li>Educational resources on the autonomy and battery life of different electric car models.</li>\n <li>Insights into premier electric vehicle brands.</li>\n </ul>\n\n <h2>Potential Competitors</h2>\n <table border=\"1\">\n <tr>\n <th>Competitor Name</th>\n <th>Website</th>\n </tr>\n <tr>\n <td>Competitor1</td>\n <td><a href=\"https://www.example1.com\">https://www.example1.com</a></td>\n </tr>\n <tr>\n <td>Competitor2</td>\n <td><a href=\"https://www.example2.com\">https://www.example2.com</a></td>\n </tr>\n <tr>\n <td>Competitor3</td>\n <td><a href=\"https://www.example3.com\">https://www.example3.com</a></td>\n </tr>\n <tr>\n <td>Competitor4</td>\n <td><a href=\"https://www.example4.com\">https://www.example4.com</a></td>\n </tr>\n </table>\n"
}
]
}
},
"credentials": {
"openAiApi": {
"id": "",
"name": "OpenAi Connection"
}
},
"typeVersion": 1.3
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "",
"connections": {
"HTML To Markdown": {
"main": [
[
{
"node": "Code - Markdown to Slack Markdown",
"type": "main",
"index": 0
}
]
]
},
"Code - Markdown to Slack Markdown": {
"main": [
[
{
"node": "Slack - Notify ",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - Message GPT-4o with Scraped Data": {
"main": [
[
{
"node": "Pipedrive - Create a Note with OpenAI output",
"type": "main",
"index": 0
}
]
]
},
"Pipedrive - Create a Note with OpenAI output": {
"main": [
[
{
"node": "HTML To Markdown",
"type": "main",
"index": 0
}
]
]
},
"Scrapingbee - Get Organization's URL content": {
"main": [
[
{
"node": "OpenAI - Message GPT-4o with Scraped Data",
"type": "main",
"index": 0
}
]
]
},
"Pipedrive Trigger - An Organization is created": {
"main": [
[
{
"node": "Scrapingbee - Get Organization's URL content",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,513 @@
{
"meta": {
"instanceId": "cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7"
},
"nodes": [
{
"id": "96ef3bfe-a493-4377-b090-6b2d02d87480",
"name": "Verify Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1420,
800
],
"parameters": {
"options": {
"responseCode": 200,
"responseHeaders": {
"entries": [
{
"name": "Content-type",
"value": "application/json"
}
]
}
},
"respondWith": "json",
"responseBody": "={\"challenge\":\"{{ $json.body.challenge }}\"}"
},
"typeVersion": 1
},
{
"id": "38db6da6-13bf-47a1-b5cb-f06403b309ac",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2120,
1220
],
"parameters": {
"model": "gpt-4o",
"options": {}
},
"credentials": {
"openAiApi": {
"id": "QpFZ2EiM3WGl6Zr3",
"name": "Marketing OpenAI"
}
},
"typeVersion": 1
},
{
"id": "139b606d-29ae-480d-bde7-458ef45dba01",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"position": [
1840,
700
],
"parameters": {},
"typeVersion": 1
},
{
"id": "64acd4c6-cd53-46e5-a29e-40884044b186",
"name": "Window Buffer Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
2800,
1220
],
"parameters": {
"sessionKey": "={{ $('Receive DMs').item.json[\"body\"][\"event\"][\"channel\"] }}",
"sessionIdType": "customKey",
"contextWindowLength": 10
},
"typeVersion": 1.2
},
{
"id": "e605864f-198e-4358-8333-50ed962d4e50",
"name": "Check if Bot",
"type": "n8n-nodes-base.if",
"position": [
1640,
800
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "89ed1b2a-5e42-4196-989d-f7f81df04b6d",
"operator": {
"type": "string",
"operation": "notExists",
"singleValue": true
},
"leftValue": "={{ $json.body.event.user }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2
},
{
"id": "8479c41e-b251-4f32-8daa-421969c4c8b3",
"name": "Send Initial Message",
"type": "n8n-nodes-base.slack",
"position": [
2140,
820
],
"parameters": {
"text": "On it! Let me check Confluence to see if there are any relevant links to answer your question. ",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Receive DMs').item.json[\"body\"][\"event\"][\"channel\"] }}"
},
"otherOptions": {
"botProfile": {
"imageValues": {
"icon_url": "https://avatars.slack-edge.com/2024-08-30/7671440019297_d6ce97ff3ab5a3abf9c1_72.jpg",
"profilePhotoType": "image"
}
},
"includeLinkToWorkflow": false
}
},
"credentials": {
"slackApi": {
"id": "OfRxDxHFIqk1q44a",
"name": "helphub n8n labs auth"
}
},
"typeVersion": 2.1
},
{
"id": "dcd325b1-1ee8-4133-9a6e-8b37bf20d056",
"name": "Delete Initial Message",
"type": "n8n-nodes-base.slack",
"position": [
2960,
760
],
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Receive DMs').item.json[\"body\"][\"event\"][\"channel\"] }}"
},
"operation": "delete",
"timestamp": "={{ $('Send Initial Message').item.json[\"message_timestamp\"] }}"
},
"credentials": {
"slackApi": {
"id": "OfRxDxHFIqk1q44a",
"name": "helphub n8n labs auth"
}
},
"typeVersion": 2.1
},
{
"id": "8d3ac15c-b0bc-459c-9523-685b7f498efb",
"name": "Send Message",
"type": "n8n-nodes-base.slack",
"position": [
3160,
760
],
"parameters": {
"text": "={{ $('AI Agent').item.json.output.replace(/\\[(.+?)\\]\\((.+?)\\)/g, '<$2|$1>').replace(/\\*\\*(.+?)\\*\\*/g, '*$1*') }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Receive DMs').item.json[\"body\"][\"event\"][\"channel\"] }}"
},
"otherOptions": {
"botProfile": {
"imageValues": {
"icon_url": "https://avatars.slack-edge.com/2024-08-30/7671440019297_d6ce97ff3ab5a3abf9c1_72.jpg",
"profilePhotoType": "image"
}
},
"includeLinkToWorkflow": false
}
},
"credentials": {
"slackApi": {
"id": "OfRxDxHFIqk1q44a",
"name": "helphub n8n labs auth"
}
},
"typeVersion": 2.1
},
{
"id": "02afa6b3-c528-4925-8b92-7b708b10e7ca",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
1160,
460
],
"parameters": {
"color": 7,
"width": 414.5626477541374,
"height": 516.5011820330969,
"content": "![Imgur](https://i.imgur.com/iKyMV0N.png)\n## Webhook Trigger\nThe first node receives all messages from Slack API via Subscription Events API. You can find more information about setting up the subscription events API by [clicking here](https://api.slack.com/apis/connections/events-api). The second node responds to the periodic security challenges that Slack sends to ensure the N8n webhook is still active. "
},
"typeVersion": 1
},
{
"id": "a8caa088-80dd-44a8-8c61-7a03a37de386",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1600,
460
],
"parameters": {
"color": 7,
"width": 403.49881796690335,
"height": 517.6832151300242,
"content": "![n8n](https://i.imgur.com/lKnBNnH.png)\n## Check for Bot Responses\nIf the message received is from a Bot instead of a real user, it will ignore the message."
},
"typeVersion": 1
},
{
"id": "17b51014-4f9d-4650-963b-8d8d944869ea",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
2900,
460
],
"parameters": {
"color": 7,
"width": 430.54373522458616,
"height": 451.3947990543734,
"content": "![Slack](https://i.imgur.com/iKyMV0N.png)\n## Delete Receipt and Send Response \nOnce the AI response is generated in response to the slack message, n8n delete's it's original *Message Received* message to avoid cluttering up the user's DMs, and then sends the final Slack message back to the user. "
},
"typeVersion": 1
},
{
"id": "494a9ada-18e9-48a6-86a9-5e72cc797ddf",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
2394.7517730496443,
460
],
"parameters": {
"color": 7,
"width": 488.1796690307332,
"height": 723.5460992907797,
"content": "![OpenAI](https://i.imgur.com/o89G0If.png)\n## Parse Response with AI Model \nThis workflow currently uses OpenAI to power it's responses, but you can open the AI Agent node below and set your own AI LLM using the n8n options offered. "
},
"typeVersion": 1
},
{
"id": "31bc923f-c981-45fd-827d-cede2ec3f3c3",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
2020,
460
],
"parameters": {
"color": 7,
"width": 356.5484633569741,
"height": 516.5011820330968,
"content": "![Slack](https://i.imgur.com/iKyMV0N.png)\n## Response Received\nOnce N8n sees that the messaged received is from a user, it will respond right away to acknowledge a message was received. You can edit the message by opening the node below. "
},
"typeVersion": 1
},
{
"id": "e81d6b07-9ac0-4848-ab7f-57a588103ce5",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
2980,
1200
],
"parameters": {
"color": 7,
"width": 951.1571908442271,
"height": 467.66775526888296,
"content": "![n8n](https://i.imgur.com/FWJX4km.png)\n## Build n8n workflow to query Knowledge Base\nBuilding your own tools for an AI Agent to use is simple and straightforward, but requires that you build a second workflow and then connect it to this one by inputting the workflow ID from the workflow URL in the *Custom n8n KB Tool* sub node. \n\nThis gives you the freedom to work with any tool, whether n8n has support for it or not. In this sample build, we have connected the AI agent to Confluence, which does not have a native built in n8n node. For this we use the HTTP request node and pointed it to Confluence's search api. It then returns a response that the AI agent uses to generate a final slack message response to the user. "
},
"typeVersion": 1
},
{
"id": "890aeb96-1721-4cb4-a609-5409b30d5f6c",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
2320,
1200
],
"parameters": {
"color": 7,
"width": 644.582152697438,
"height": 318.6662788502134,
"content": "![n8n](https://i.imgur.com/lKnBNnH.png)\n\n## Remembers the last 5 messages that a user sent\nBecause we are passing the channel ID of the user to the memory module, n8n is storing the last 5 slack messages sent to it per slack channel. This means that it will remember all your users conversations separately from one another and not get confused by different requests from different users. You can increase the memory storage by using a different storage medium and increase the number of prompts and responses it should remember. "
},
"typeVersion": 1
},
{
"id": "1fa61c12-70d1-4d7e-8564-a2a574804243",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1660,
1200
],
"parameters": {
"color": 7,
"width": 644.582152697438,
"height": 318.6662788502134,
"content": "![OpenAI](https://i.imgur.com/o89G0If.png)\n\n## Change the AI Agents LLM\nTo change the model used, simply delete the ChatGPT model and replace with a different supported model by hitting the plus sign under model in the AI Agent."
},
"typeVersion": 1
},
{
"id": "fecd81da-4723-4886-8d6f-9729623028a9",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
460,
460
],
"parameters": {
"width": 675.1724774900403,
"height": 994.2389415638766,
"content": "![n8n](https://i.imgur.com/lKnBNnH.png)\n# Streamline IT Inquiries with n8n & AI!\n\n## Introducing the IT Ops AI SlackBot Workflow---a sophisticated solution designed to automate and optimize the management of IT-related inquiries via Slack.\n\nWhen an employee messages the IT department slack app, the workflow kicks off with the \"Receive DMs\" node, which captures incoming messages and ensures a secure and active communication line by responding to Slack's webhook challenges.\n\n**How It Works:**\n\n- Verify Webhook: Responds to slacks challenge and respond requests to ensure is still active.\n- Check if bot: Checks whether the message sender is a bot to prevent unnecessary processing.\n- Send Initial Message: Sends a quick confirmation, like \"On it!\", to let the user know their query is being handled.\n- AI-Driven Responses: Employs the \"AI Agent\" node with OpenAI to craft relevant replies based on the conversation history maintained by the \"Window Buffer Memory\" node.\n- Knowledge Integration tool: Uses a custom Knowledge Base tool to fetch pertinent information from confluence, enhancing the quality of responses.\n- Cleanup and Reply: Deletes the initial acknowledgment to tidy up before sending the final detailed response back to the user.\n\n\n**Get Started:**\n- Ensure your [Slack](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.slack/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.slack) and [OpenAI](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=@n8n/n8n-nodes-langchain.lmChatOpenAi) integrations are properly set up.\n- Customize the workflow to align with your IT department's protocols.\n\n\n**Need Help?**\n- Join the discussion on our Forum or check out resources on Discord!\n\n\nDeploy this workflow to improve response times and enhance the efficiency of your IT support services."
},
"typeVersion": 1
},
{
"id": "16b79887-8218-4056-8add-39ebee6166bd",
"name": "Receive DMs",
"type": "n8n-nodes-base.webhook",
"position": [
1200,
800
],
"webhookId": "44c26a10-d54a-46ce-a522-5d83e8a854be",
"parameters": {
"path": "44c26a10-d54a-46ce-a522-5d83e8a854be",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "201b5399-6fff-48ca-81f0-a5cfc02c46d5",
"name": "Call Confluence Workflow Tool",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
3380,
1280
],
"parameters": {
"name": "confluence_kb_search",
"workflowId": {
"__rl": true,
"mode": "list",
"value": "Pxzc65WaCPn2yB5I",
"cachedResultName": "KB Tool - Confluence KB"
},
"description": "Call this tool to search n8n-labs confluence knowledge base. The input should be the user prompt reduced into 1 to 3 keywords to use for a KB search. These words should be words that are most likely to be contained in the text of a KB article that is helpful based on the user prompt. The words should be the only response and they should just be separated by a space."
},
"typeVersion": 1.2
},
{
"id": "41026e03-5844-4e57-86bf-fc7e586265a4",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2500,
820
],
"parameters": {
"text": "={{ $('Receive DMs').item.json.body.event.text }}",
"options": {
"humanMessage": "TOOLS\n------\nAssistant can ask the user to use tools to look up information that may be helpful in answering the users original question. The tools the human can use are:\n\n{tools}\n\nIf no response is given for a given tool or the response is an error, then do not reference the tool results and instead ask for more context. \n\nThe tools currently search Notion and returns back a list of results. Please try to respond using the most relevant result URL to guide the user to the right answer. \n\nIf you are not sure, let the user know you were unable to find a notion page for them to help, but give them the top results that are relevant to their request.\n\nPlease summarize the results and return all the URLs exactly as you get them from the tool. Please format all links you send in this format: <url|name of url> \nAdditionally, here are other formatting layouts to use: \n_italic_ will produce italicized text\n*bold* will produce bold text\n~strike~ will produce strikethrough text\n\n{format_instructions}\n\nUSER'S INPUT\n--------------------\nHere is the user's input (remember to respond with a slack flavored (see above for more details) code snippet of a json blob with a single action, and NOTHING else):\n\n{{input}}\n",
"maxIterations": 2,
"systemMessage": "You are Knowledge Ninja, a specialized IT support tool developed to streamline interactions between employees and the IT department and the company knowledge base. \n\nDesigned with efficiency in mind, Knowledge Ninja is equipped to handle a variety of IT-related queries, from sales competition analysis to troubleshooting to more complex technical guidance.\n\nAs a dynamic knowledge tool, Knowledge Ninja utilizes a comprehensive internal knowledge base that can be tailored to your organization's specific IT infrastructure and policies. \n\nThis allows it to deliver precise and contextually relevant information swiftly, enhancing the support process.\n\nKnowledge Ninja is continuously updated to reflect the latest IT standards and practices, ensuring that the guidance it provides is both accurate and up-to-date. \n\nIts capabilities include understanding detailed queries, providing step-by-step troubleshooting instructions, and clarifying IT policies.\n\nPlease format all links you send in this format: <url|name of url> \nAdditionally, here are other formatting layouts to use: \n_italic_ will produce italicized text\n*bold* will produce bold text\n~strike~ will produce strikethrough text"
},
"promptType": "define"
},
"typeVersion": 1.5
}
],
"pinData": {},
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Delete Initial Message",
"type": "main",
"index": 0
}
]
]
},
"Receive DMs": {
"main": [
[
{
"node": "Verify Webhook",
"type": "main",
"index": 0
}
]
]
},
"Check if Bot": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Initial Message",
"type": "main",
"index": 0
}
]
]
},
"Verify Webhook": {
"main": [
[
{
"node": "Check if Bot",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Send Initial Message": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Window Buffer Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Delete Initial Message": {
"main": [
[
{
"node": "Send Message",
"type": "main",
"index": 0
}
]
]
},
"Call Confluence Workflow Tool": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,752 @@
{
"nodes": [
{
"id": "82fd6023-2cc3-416e-83b7-fda24d07d77a",
"name": "Issues to List",
"type": "n8n-nodes-base.splitOut",
"position": [
40,
-100
],
"parameters": {
"options": {},
"fieldToSplitOut": "data.issues.nodes"
},
"typeVersion": 1
},
{
"id": "9cc77786-e14f-47c6-a3cf-60c2830612e6",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
360,
80
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "821d4a60-81a4-4915-9c13-3d978cc0114b",
"name": "Combine Sentiment Analysis",
"type": "n8n-nodes-base.set",
"position": [
700,
-80
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{\n{\n ...$('Issues to List').item.json,\n ...$json.output\n}\n}}"
},
"typeVersion": 3.4
},
{
"id": "fe6560f6-2e1b-4442-a2af-bd5a1623f213",
"name": "Sentiment over Issue Comments",
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
"position": [
360,
-80
],
"parameters": {
"text": "={{\n$json.comments.nodes.map(node => [\n `${node.user.displayName} commented on ${node.createdAt}:`,\n node.body\n].join('\\n')).join('---\\n')\n}}",
"options": {},
"attributes": {
"attributes": [
{
"name": "sentiment",
"required": true,
"description": "One of positive, negative or neutral"
},
{
"name": "sentimentSummary",
"description": "Describe the sentiment of the conversation"
}
]
}
},
"typeVersion": 1
},
{
"id": "4fd0345d-e5bf-426d-8403-e2217e19bbea",
"name": "Copy of Issue",
"type": "n8n-nodes-base.set",
"position": [
1200,
-60
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{ $json }}"
},
"typeVersion": 3.4
},
{
"id": "6d103d67-451e-4780-8f52-f4dba4b42860",
"name": "For Each Issue...",
"type": "n8n-nodes-base.splitInBatches",
"position": [
1020,
-60
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "032702d9-27d8-4735-b978-20b55bc1a74f",
"name": "Get Existing Sentiment",
"type": "n8n-nodes-base.airtable",
"position": [
1380,
-60
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appViDaeaFw4qv9La",
"cachedResultUrl": "https://airtable.com/appViDaeaFw4qv9La",
"cachedResultName": "Sentiment Analysis over Issue Comments"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblhO0sfRhKP6ibS8",
"cachedResultUrl": "https://airtable.com/appViDaeaFw4qv9La/tblhO0sfRhKP6ibS8",
"cachedResultName": "Table 1"
},
"options": {
"fields": [
"Issue ID",
"Current Sentiment"
]
},
"operation": "search",
"filterByFormula": "={Issue ID} = '{{ $json.identifier || 'XYZ' }}'"
},
"credentials": {
"airtableTokenApi": {
"id": "Und0frCQ6SNVX3VV",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1,
"alwaysOutputData": true
},
{
"id": "f2ded6fa-8b0f-4a34-868c-13c19f725c98",
"name": "Update Row",
"type": "n8n-nodes-base.airtable",
"position": [
1560,
-60
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appViDaeaFw4qv9La",
"cachedResultUrl": "https://airtable.com/appViDaeaFw4qv9La",
"cachedResultName": "Sentiment Analysis over Issue Comments"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblhO0sfRhKP6ibS8",
"cachedResultUrl": "https://airtable.com/appViDaeaFw4qv9La/tblhO0sfRhKP6ibS8",
"cachedResultName": "Table 1"
},
"columns": {
"value": {
"Summary": "={{ $('Copy of Issue').item.json.sentimentSummary || '' }}",
"Assigned": "={{ $('Copy of Issue').item.json.assignee.name }}",
"Issue ID": "={{ $('Copy of Issue').item.json.identifier }}",
"Issue Title": "={{ $('Copy of Issue').item.json.title }}",
"Issue Created": "={{ $('Copy of Issue').item.json.createdAt }}",
"Issue Updated": "={{ $('Copy of Issue').item.json.updatedAt }}",
"Current Sentiment": "={{ $('Copy of Issue').item.json.sentiment.toSentenceCase() }}",
"Previous Sentiment": "={{ !$json.isEmpty() ? $json['Current Sentiment'] : 'N/A' }}"
},
"schema": [
{
"id": "id",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "id",
"defaultMatch": true
},
{
"id": "Issue ID",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Issue ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Previous Sentiment",
"type": "options",
"display": true,
"options": [
{
"name": "Positive",
"value": "Positive"
},
{
"name": "Negative",
"value": "Negative"
},
{
"name": "Neutral",
"value": "Neutral"
},
{
"name": "N/A",
"value": "N/A"
}
],
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Previous Sentiment",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Current Sentiment",
"type": "options",
"display": true,
"options": [
{
"name": "Positive",
"value": "Positive"
},
{
"name": "Negative",
"value": "Negative"
},
{
"name": "Neutral",
"value": "Neutral"
},
{
"name": "N/A",
"value": "N/A"
}
],
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Current Sentiment",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Issue Title",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Issue Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Issue Created",
"type": "dateTime",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Issue Created",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Issue Updated",
"type": "dateTime",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Issue Updated",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Assigned",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Assigned",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Created",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Created",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Last Modified",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Last Modified",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Issue ID"
]
},
"options": {},
"operation": "upsert"
},
"credentials": {
"airtableTokenApi": {
"id": "Und0frCQ6SNVX3VV",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "e6fb0b8f-2469-4b66-b9e2-f4f3c0a613af",
"name": "Airtable Trigger",
"type": "n8n-nodes-base.airtableTrigger",
"position": [
1900,
-40
],
"parameters": {
"baseId": {
"__rl": true,
"mode": "id",
"value": "appViDaeaFw4qv9La"
},
"tableId": {
"__rl": true,
"mode": "id",
"value": "tblhO0sfRhKP6ibS8"
},
"pollTimes": {
"item": [
{
"mode": "everyHour"
}
]
},
"triggerField": "Current Sentiment",
"authentication": "airtableTokenApi",
"additionalFields": {}
},
"credentials": {
"airtableTokenApi": {
"id": "Und0frCQ6SNVX3VV",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 1
},
{
"id": "669762c4-860b-43ad-b677-72d4564e1c29",
"name": "Sentiment Transition",
"type": "n8n-nodes-base.switch",
"position": [
2080,
-40
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "NON-NEGATIVE to NEGATIVE",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.fields[\"Previous Sentiment\"] !== 'Negative' && $json.fields[\"Current Sentiment\"] === 'Negative' }}",
"rightValue": ""
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "none"
}
},
"typeVersion": 3.2
},
{
"id": "2fbcfbea-3989-459b-8ca7-b65c130a479b",
"name": "Fetch Active Linear Issues",
"type": "n8n-nodes-base.graphql",
"position": [
-140,
-100
],
"parameters": {
"query": "=query (\n $filter: IssueFilter\n) {\n issues(\n filter: $filter\n ) {\n nodes {\n id\n identifier\n title\n description\n url\n createdAt\n updatedAt\n assignee {\n name\n }\n comments {\n nodes {\n id\n createdAt\n user {\n displayName\n }\n body\n }\n }\n }\n }\n}",
"endpoint": "https://api.linear.app/graphql",
"variables": "={{\n{\n \"filter\": {\n updatedAt: { gte: $now.minus(30, 'minutes').toISO() }\n }\n}\n}}",
"requestFormat": "json",
"authentication": "headerAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "XME2Ubkuy9hpPEM5",
"name": "Linear.app (heightio)"
}
},
"typeVersion": 1
},
{
"id": "aaf1c25e-c398-4715-88bf-bd98daafc10f",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-340,
-100
],
"parameters": {
"rule": {
"interval": [
{
"field": "minutes",
"minutesInterval": 30
}
]
}
},
"typeVersion": 1.2
},
{
"id": "b3e2df39-90ce-4ebf-aa68-05499965ec30",
"name": "Deduplicate Notifications",
"type": "n8n-nodes-base.removeDuplicates",
"position": [
2280,
-40
],
"parameters": {
"options": {},
"operation": "removeItemsSeenInPreviousExecutions",
"dedupeValue": "={{ $json.fields[\"Issue ID\"] }}:{{ $json.fields['Last Modified'] }}"
},
"typeVersion": 2
},
{
"id": "2a116475-32cd-4c9d-bfc1-3bd494f79a49",
"name": "Report Issue Negative Transition",
"type": "n8n-nodes-base.slack",
"position": [
2480,
-40
],
"webhookId": "612f1001-3fcc-480b-a835-05f9e2d56a5f",
"parameters": {
"text": "={{ $('Deduplicate Notifications').all().length }} Issues have transitions to Negative Sentiment",
"select": "channel",
"blocksUi": "={{\n{\n \"blocks\": [\n {\n \"type\": \"section\",\n \"text\": {\n \"type\": \"mrkdwn\",\n \"text\": \":rotating_light: The following Issues transitioned to Negative Sentiment\"\n }\n },\n {\n \"type\": \"divider\"\n },\n ...($('Deduplicate Notifications').all().map(item => (\n {\n \"type\": \"section\",\n \"text\": {\n \"type\": \"mrkdwn\",\n \"text\": `*<https://linear.app/myOrg/issue/${$json.fields['Issue ID']}|${$json.fields['Issue ID']} ${$json.fields['Issue Title']}>*\\n${$json.fields.Summary}`\n }\n }\n )))\n ]\n}\n}}",
"channelId": {
"__rl": true,
"mode": "list",
"value": "C0749JVFERK",
"cachedResultName": "n8n-tickets"
},
"messageType": "block",
"otherOptions": {}
},
"credentials": {
"slackApi": {
"id": "VfK3js0YdqBdQLGP",
"name": "Slack account"
}
},
"executeOnce": true,
"typeVersion": 2.3
},
{
"id": "1f3d30b6-de31-45a8-a872-554c339f112f",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-420,
-320
],
"parameters": {
"color": 7,
"width": 660,
"height": 440,
"content": "## 1. Continuously Monitor Active Linear Issues\n[Learn more about the GraphQL node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.graphql)\n\nTo keep up with the latest changes in our active Linear tickets, we'll need to use Linear's GraphQL endpoint because filtering is currently unavailable in the official Linear.app node.\n\nFor this demonstration, we'll check for updated tickets every 30mins."
},
"typeVersion": 1
},
{
"id": "9024512d-5cb9-4e9f-b6e1-495d1a32118a",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
260,
-320
],
"parameters": {
"color": 7,
"width": 640,
"height": 560,
"content": "## 2. Sentiment Analysis on Current Issue Activity\n[Learn more about the Information Extractor node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.information-extractor)\n\nWith our recently updated posts, we can use our AI to perform a quick sentiment analysis on the ongoing conversation to check the overall mood of the support issue. This is a great way to check how things are generally going in the support queue; positive should be normal but negative could indicate some uncomfortableness or even frustration."
},
"typeVersion": 1
},
{
"id": "233ebd6d-38cb-4f2d-84b5-29c97d30d77b",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
920,
-320
],
"parameters": {
"color": 7,
"width": 840,
"height": 560,
"content": "## 3. Capture and Track Results in Airtable\n[Learn more about the Airtable node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.airtable)\n\nNext, we can capture this analysis in our insights database as means for human review. When the issue is new, we can create a new row but if the issue exists, we will update it's existing row instead.\n\nWhen updating an existing row, we move its previous \"current sentiment\" value into the \"previous sentiment\" column and replace with our new current sentiment. This gives us a \"sentiment transition\" which will be useful in the next step.\n\nCheck out the Airtable here: https://airtable.com/appViDaeaFw4qv9La/shrq6HgeYzpW6uwXL"
},
"typeVersion": 1
},
{
"id": "a2229225-b580-43cb-b234-4f69cb5924fd",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1800,
-320
],
"parameters": {
"color": 7,
"width": 920,
"height": 560,
"content": "## 4. Get Notified when Sentiment becomes Negative\n[Learn more about the Slack node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.slack/)\n\nA good use-case for tracking sentiment transitions could be to be alerted if ever an issue moves from a non-negative sentiment to a negative one. This could be a signal of issue handling troubles which may require attention before it escalates.\n\nIn this demonstration, we use the Airtable trigger to catch rows which have their sentiment column updated and check for the non-negative-to-negative sentiment transition using the switch node. For those matching rows, we combine add send a notification via slack. A cool trick is to use the \"remove duplication\" node to prevent repeat notifications for the same updates - here we combine the Linear issue key and the row's last modified date."
},
"typeVersion": 1
},
{
"id": "6f26769e-ec5d-46d0-ae0a-34148b24e6a2",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-940,
-720
],
"parameters": {
"width": 480,
"height": 840,
"content": "## Try It Out!\n### This n8n template performs continous monitoring on Linear Issue conversations performing sentiment analysis and alerting when the sentiment becomes negative.\nThis is helpful to quickly identify difficult customer support situations early and prioritising them before they get out of hand.\n\n## How it works\n* A scheduled trigger is used to fetch recently updated issues in Linear using the GraphQL node.\n* Each issue's comments thread is passed into a simple Information Extractor node to identify the overall sentiment.\n* The resulting sentiment analysis combined with the some issue details are uploaded to Airtable for review.\n* When the template is re-run at a later date, each issue is re-analysed for sentiment\n* Each issue's new sentiment state is saved to the airtable whilst its previous state is moved to the \"previous sentiment\" column.\n* An Airtable trigger is used to watch for recently updated rows\n* Each matching Airtable row is filtered to check if it has a previous non-negative state but now has a negative state in its current sentiment.\n* The results are sent via notification to a team slack channel for priority.\n\n**Check out the sample Airtable here**: https://airtable.com/appViDaeaFw4qv9La/shrq6HgeYzpW6uwXL\n\n## How to use\n* Modify the GraphQL filter to fetch issues to a relevant issue type, team or person.\n* Update the Slack channel to ensure messages are sent to the correct location.\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Hacking!"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Update Row": {
"main": [
[
{
"node": "For Each Issue...",
"type": "main",
"index": 0
}
]
]
},
"Copy of Issue": {
"main": [
[
{
"node": "Get Existing Sentiment",
"type": "main",
"index": 0
}
]
]
},
"Issues to List": {
"main": [
[
{
"node": "Sentiment over Issue Comments",
"type": "main",
"index": 0
}
]
]
},
"Airtable Trigger": {
"main": [
[
{
"node": "Sentiment Transition",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Fetch Active Linear Issues",
"type": "main",
"index": 0
}
]
]
},
"For Each Issue...": {
"main": [
[],
[
{
"node": "Copy of Issue",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Sentiment over Issue Comments",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Sentiment Transition": {
"main": [
[
{
"node": "Deduplicate Notifications",
"type": "main",
"index": 0
}
]
]
},
"Get Existing Sentiment": {
"main": [
[
{
"node": "Update Row",
"type": "main",
"index": 0
}
]
]
},
"Deduplicate Notifications": {
"main": [
[
{
"node": "Report Issue Negative Transition",
"type": "main",
"index": 0
}
]
]
},
"Combine Sentiment Analysis": {
"main": [
[
{
"node": "For Each Issue...",
"type": "main",
"index": 0
}
]
]
},
"Fetch Active Linear Issues": {
"main": [
[
{
"node": "Issues to List",
"type": "main",
"index": 0
}
]
]
},
"Sentiment over Issue Comments": {
"main": [
[
{
"node": "Combine Sentiment Analysis",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,752 @@
{
"nodes": [
{
"id": "82fd6023-2cc3-416e-83b7-fda24d07d77a",
"name": "Issues to List",
"type": "n8n-nodes-base.splitOut",
"position": [
40,
-100
],
"parameters": {
"options": {},
"fieldToSplitOut": "data.issues.nodes"
},
"typeVersion": 1
},
{
"id": "9cc77786-e14f-47c6-a3cf-60c2830612e6",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
360,
80
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "821d4a60-81a4-4915-9c13-3d978cc0114b",
"name": "Combine Sentiment Analysis",
"type": "n8n-nodes-base.set",
"position": [
700,
-80
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{\n{\n ...$('Issues to List').item.json,\n ...$json.output\n}\n}}"
},
"typeVersion": 3.4
},
{
"id": "fe6560f6-2e1b-4442-a2af-bd5a1623f213",
"name": "Sentiment over Issue Comments",
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
"position": [
360,
-80
],
"parameters": {
"text": "={{\n$json.comments.nodes.map(node => [\n `${node.user.displayName} commented on ${node.createdAt}:`,\n node.body\n].join('\\n')).join('---\\n')\n}}",
"options": {},
"attributes": {
"attributes": [
{
"name": "sentiment",
"required": true,
"description": "One of positive, negative or neutral"
},
{
"name": "sentimentSummary",
"description": "Describe the sentiment of the conversation"
}
]
}
},
"typeVersion": 1
},
{
"id": "4fd0345d-e5bf-426d-8403-e2217e19bbea",
"name": "Copy of Issue",
"type": "n8n-nodes-base.set",
"position": [
1200,
-60
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{ $json }}"
},
"typeVersion": 3.4
},
{
"id": "6d103d67-451e-4780-8f52-f4dba4b42860",
"name": "For Each Issue...",
"type": "n8n-nodes-base.splitInBatches",
"position": [
1020,
-60
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "032702d9-27d8-4735-b978-20b55bc1a74f",
"name": "Get Existing Sentiment",
"type": "n8n-nodes-base.airtable",
"position": [
1380,
-60
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appViDaeaFw4qv9La",
"cachedResultUrl": "https://airtable.com/appViDaeaFw4qv9La",
"cachedResultName": "Sentiment Analysis over Issue Comments"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblhO0sfRhKP6ibS8",
"cachedResultUrl": "https://airtable.com/appViDaeaFw4qv9La/tblhO0sfRhKP6ibS8",
"cachedResultName": "Table 1"
},
"options": {
"fields": [
"Issue ID",
"Current Sentiment"
]
},
"operation": "search",
"filterByFormula": "={Issue ID} = '{{ $json.identifier || 'XYZ' }}'"
},
"credentials": {
"airtableTokenApi": {
"id": "Und0frCQ6SNVX3VV",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1,
"alwaysOutputData": true
},
{
"id": "f2ded6fa-8b0f-4a34-868c-13c19f725c98",
"name": "Update Row",
"type": "n8n-nodes-base.airtable",
"position": [
1560,
-60
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appViDaeaFw4qv9La",
"cachedResultUrl": "https://airtable.com/appViDaeaFw4qv9La",
"cachedResultName": "Sentiment Analysis over Issue Comments"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblhO0sfRhKP6ibS8",
"cachedResultUrl": "https://airtable.com/appViDaeaFw4qv9La/tblhO0sfRhKP6ibS8",
"cachedResultName": "Table 1"
},
"columns": {
"value": {
"Summary": "={{ $('Copy of Issue').item.json.sentimentSummary || '' }}",
"Assigned": "={{ $('Copy of Issue').item.json.assignee.name }}",
"Issue ID": "={{ $('Copy of Issue').item.json.identifier }}",
"Issue Title": "={{ $('Copy of Issue').item.json.title }}",
"Issue Created": "={{ $('Copy of Issue').item.json.createdAt }}",
"Issue Updated": "={{ $('Copy of Issue').item.json.updatedAt }}",
"Current Sentiment": "={{ $('Copy of Issue').item.json.sentiment.toSentenceCase() }}",
"Previous Sentiment": "={{ !$json.isEmpty() ? $json['Current Sentiment'] : 'N/A' }}"
},
"schema": [
{
"id": "id",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "id",
"defaultMatch": true
},
{
"id": "Issue ID",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Issue ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Previous Sentiment",
"type": "options",
"display": true,
"options": [
{
"name": "Positive",
"value": "Positive"
},
{
"name": "Negative",
"value": "Negative"
},
{
"name": "Neutral",
"value": "Neutral"
},
{
"name": "N/A",
"value": "N/A"
}
],
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Previous Sentiment",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Current Sentiment",
"type": "options",
"display": true,
"options": [
{
"name": "Positive",
"value": "Positive"
},
{
"name": "Negative",
"value": "Negative"
},
{
"name": "Neutral",
"value": "Neutral"
},
{
"name": "N/A",
"value": "N/A"
}
],
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Current Sentiment",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Issue Title",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Issue Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Issue Created",
"type": "dateTime",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Issue Created",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Issue Updated",
"type": "dateTime",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Issue Updated",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Assigned",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Assigned",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Created",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Created",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Last Modified",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Last Modified",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Issue ID"
]
},
"options": {},
"operation": "upsert"
},
"credentials": {
"airtableTokenApi": {
"id": "Und0frCQ6SNVX3VV",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "e6fb0b8f-2469-4b66-b9e2-f4f3c0a613af",
"name": "Airtable Trigger",
"type": "n8n-nodes-base.airtableTrigger",
"position": [
1900,
-40
],
"parameters": {
"baseId": {
"__rl": true,
"mode": "id",
"value": "appViDaeaFw4qv9La"
},
"tableId": {
"__rl": true,
"mode": "id",
"value": "tblhO0sfRhKP6ibS8"
},
"pollTimes": {
"item": [
{
"mode": "everyHour"
}
]
},
"triggerField": "Current Sentiment",
"authentication": "airtableTokenApi",
"additionalFields": {}
},
"credentials": {
"airtableTokenApi": {
"id": "Und0frCQ6SNVX3VV",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 1
},
{
"id": "669762c4-860b-43ad-b677-72d4564e1c29",
"name": "Sentiment Transition",
"type": "n8n-nodes-base.switch",
"position": [
2080,
-40
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "NON-NEGATIVE to NEGATIVE",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.fields[\"Previous Sentiment\"] !== 'Negative' && $json.fields[\"Current Sentiment\"] === 'Negative' }}",
"rightValue": ""
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "none"
}
},
"typeVersion": 3.2
},
{
"id": "2fbcfbea-3989-459b-8ca7-b65c130a479b",
"name": "Fetch Active Linear Issues",
"type": "n8n-nodes-base.graphql",
"position": [
-140,
-100
],
"parameters": {
"query": "=query (\n $filter: IssueFilter\n) {\n issues(\n filter: $filter\n ) {\n nodes {\n id\n identifier\n title\n description\n url\n createdAt\n updatedAt\n assignee {\n name\n }\n comments {\n nodes {\n id\n createdAt\n user {\n displayName\n }\n body\n }\n }\n }\n }\n}",
"endpoint": "https://api.linear.app/graphql",
"variables": "={{\n{\n \"filter\": {\n updatedAt: { gte: $now.minus(30, 'minutes').toISO() }\n }\n}\n}}",
"requestFormat": "json",
"authentication": "headerAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "XME2Ubkuy9hpPEM5",
"name": "Linear.app (heightio)"
}
},
"typeVersion": 1
},
{
"id": "aaf1c25e-c398-4715-88bf-bd98daafc10f",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-340,
-100
],
"parameters": {
"rule": {
"interval": [
{
"field": "minutes",
"minutesInterval": 30
}
]
}
},
"typeVersion": 1.2
},
{
"id": "b3e2df39-90ce-4ebf-aa68-05499965ec30",
"name": "Deduplicate Notifications",
"type": "n8n-nodes-base.removeDuplicates",
"position": [
2280,
-40
],
"parameters": {
"options": {},
"operation": "removeItemsSeenInPreviousExecutions",
"dedupeValue": "={{ $json.fields[\"Issue ID\"] }}:{{ $json.fields['Last Modified'] }}"
},
"typeVersion": 2
},
{
"id": "2a116475-32cd-4c9d-bfc1-3bd494f79a49",
"name": "Report Issue Negative Transition",
"type": "n8n-nodes-base.slack",
"position": [
2480,
-40
],
"webhookId": "612f1001-3fcc-480b-a835-05f9e2d56a5f",
"parameters": {
"text": "={{ $('Deduplicate Notifications').all().length }} Issues have transitions to Negative Sentiment",
"select": "channel",
"blocksUi": "={{\n{\n \"blocks\": [\n {\n \"type\": \"section\",\n \"text\": {\n \"type\": \"mrkdwn\",\n \"text\": \":rotating_light: The following Issues transitioned to Negative Sentiment\"\n }\n },\n {\n \"type\": \"divider\"\n },\n ...($('Deduplicate Notifications').all().map(item => (\n {\n \"type\": \"section\",\n \"text\": {\n \"type\": \"mrkdwn\",\n \"text\": `*<https://linear.app/myOrg/issue/${$json.fields['Issue ID']}|${$json.fields['Issue ID']} ${$json.fields['Issue Title']}>*\\n${$json.fields.Summary}`\n }\n }\n )))\n ]\n}\n}}",
"channelId": {
"__rl": true,
"mode": "list",
"value": "C0749JVFERK",
"cachedResultName": "n8n-tickets"
},
"messageType": "block",
"otherOptions": {}
},
"credentials": {
"slackApi": {
"id": "VfK3js0YdqBdQLGP",
"name": "Slack account"
}
},
"executeOnce": true,
"typeVersion": 2.3
},
{
"id": "1f3d30b6-de31-45a8-a872-554c339f112f",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-420,
-320
],
"parameters": {
"color": 7,
"width": 660,
"height": 440,
"content": "## 1. Continuously Monitor Active Linear Issues\n[Learn more about the GraphQL node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.graphql)\n\nTo keep up with the latest changes in our active Linear tickets, we'll need to use Linear's GraphQL endpoint because filtering is currently unavailable in the official Linear.app node.\n\nFor this demonstration, we'll check for updated tickets every 30mins."
},
"typeVersion": 1
},
{
"id": "9024512d-5cb9-4e9f-b6e1-495d1a32118a",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
260,
-320
],
"parameters": {
"color": 7,
"width": 640,
"height": 560,
"content": "## 2. Sentiment Analysis on Current Issue Activity\n[Learn more about the Information Extractor node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.information-extractor)\n\nWith our recently updated posts, we can use our AI to perform a quick sentiment analysis on the ongoing conversation to check the overall mood of the support issue. This is a great way to check how things are generally going in the support queue; positive should be normal but negative could indicate some uncomfortableness or even frustration."
},
"typeVersion": 1
},
{
"id": "233ebd6d-38cb-4f2d-84b5-29c97d30d77b",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
920,
-320
],
"parameters": {
"color": 7,
"width": 840,
"height": 560,
"content": "## 3. Capture and Track Results in Airtable\n[Learn more about the Airtable node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.airtable)\n\nNext, we can capture this analysis in our insights database as means for human review. When the issue is new, we can create a new row but if the issue exists, we will update it's existing row instead.\n\nWhen updating an existing row, we move its previous \"current sentiment\" value into the \"previous sentiment\" column and replace with our new current sentiment. This gives us a \"sentiment transition\" which will be useful in the next step.\n\nCheck out the Airtable here: https://airtable.com/appViDaeaFw4qv9La/shrq6HgeYzpW6uwXL"
},
"typeVersion": 1
},
{
"id": "a2229225-b580-43cb-b234-4f69cb5924fd",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1800,
-320
],
"parameters": {
"color": 7,
"width": 920,
"height": 560,
"content": "## 4. Get Notified when Sentiment becomes Negative\n[Learn more about the Slack node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.slack/)\n\nA good use-case for tracking sentiment transitions could be to be alerted if ever an issue moves from a non-negative sentiment to a negative one. This could be a signal of issue handling troubles which may require attention before it escalates.\n\nIn this demonstration, we use the Airtable trigger to catch rows which have their sentiment column updated and check for the non-negative-to-negative sentiment transition using the switch node. For those matching rows, we combine add send a notification via slack. A cool trick is to use the \"remove duplication\" node to prevent repeat notifications for the same updates - here we combine the Linear issue key and the row's last modified date."
},
"typeVersion": 1
},
{
"id": "6f26769e-ec5d-46d0-ae0a-34148b24e6a2",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-940,
-720
],
"parameters": {
"width": 480,
"height": 840,
"content": "## Try It Out!\n### This n8n template performs continous monitoring on Linear Issue conversations performing sentiment analysis and alerting when the sentiment becomes negative.\nThis is helpful to quickly identify difficult customer support situations early and prioritising them before they get out of hand.\n\n## How it works\n* A scheduled trigger is used to fetch recently updated issues in Linear using the GraphQL node.\n* Each issue's comments thread is passed into a simple Information Extractor node to identify the overall sentiment.\n* The resulting sentiment analysis combined with the some issue details are uploaded to Airtable for review.\n* When the template is re-run at a later date, each issue is re-analysed for sentiment\n* Each issue's new sentiment state is saved to the airtable whilst its previous state is moved to the \"previous sentiment\" column.\n* An Airtable trigger is used to watch for recently updated rows\n* Each matching Airtable row is filtered to check if it has a previous non-negative state but now has a negative state in its current sentiment.\n* The results are sent via notification to a team slack channel for priority.\n\n**Check out the sample Airtable here**: https://airtable.com/appViDaeaFw4qv9La/shrq6HgeYzpW6uwXL\n\n## How to use\n* Modify the GraphQL filter to fetch issues to a relevant issue type, team or person.\n* Update the Slack channel to ensure messages are sent to the correct location.\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Hacking!"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Update Row": {
"main": [
[
{
"node": "For Each Issue...",
"type": "main",
"index": 0
}
]
]
},
"Copy of Issue": {
"main": [
[
{
"node": "Get Existing Sentiment",
"type": "main",
"index": 0
}
]
]
},
"Issues to List": {
"main": [
[
{
"node": "Sentiment over Issue Comments",
"type": "main",
"index": 0
}
]
]
},
"Airtable Trigger": {
"main": [
[
{
"node": "Sentiment Transition",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Fetch Active Linear Issues",
"type": "main",
"index": 0
}
]
]
},
"For Each Issue...": {
"main": [
[],
[
{
"node": "Copy of Issue",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Sentiment over Issue Comments",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Sentiment Transition": {
"main": [
[
{
"node": "Deduplicate Notifications",
"type": "main",
"index": 0
}
]
]
},
"Get Existing Sentiment": {
"main": [
[
{
"node": "Update Row",
"type": "main",
"index": 0
}
]
]
},
"Deduplicate Notifications": {
"main": [
[
{
"node": "Report Issue Negative Transition",
"type": "main",
"index": 0
}
]
]
},
"Combine Sentiment Analysis": {
"main": [
[
{
"node": "For Each Issue...",
"type": "main",
"index": 0
}
]
]
},
"Fetch Active Linear Issues": {
"main": [
[
{
"node": "Issues to List",
"type": "main",
"index": 0
}
]
]
},
"Sentiment over Issue Comments": {
"main": [
[
{
"node": "Combine Sentiment Analysis",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,299 @@
{
"id": "PGLFPj5y01s26rE1",
"meta": {
"instanceId": "b68f2515130d1ee83f4af1a6f2ca359fc9bb8cdbe875ca10b6f944f99aa931b5",
"templateCredsSetupCompleted": true
},
"name": "My workflow 6",
"tags": [],
"nodes": [
{
"id": "82670f40-2e3b-4e02-ae52-f2c918c3aa1c",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
-600
],
"parameters": {
"color": 7,
"width": 280,
"height": 380,
"content": "## Command Trigger\n\nCopy the webhook URL, paste it into the Request URL of the Slack slash command, and complete the creation.\n\n\n웹훅 URL을 복사하여 슬랙 슬래시 커맨드의 Request URL에 붙이고 생성을 완료하세요."
},
"typeVersion": 1
},
{
"id": "28f56691-0ad5-47b1-974b-1ece4890933b",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
260,
-600
],
"parameters": {
"color": 7,
"height": 380,
"content": "## Command Switch\n\nSwitch each slash command.\n\n각 슬래시 커맨드를 분기하세요."
},
"typeVersion": 1
},
{
"id": "9dc9ca95-e29d-44d9-9e09-b2a72d9ad23a",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
600,
-600
],
"parameters": {
"color": 7,
"width": 360,
"height": 380,
"content": "## Create AI Messages"
},
"typeVersion": 1
},
{
"id": "025c5a59-06b6-4b6d-b3e0-aa782a133c97",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1060,
-600
],
"parameters": {
"color": 7,
"height": 340,
"content": "## Send a Slack Message"
},
"typeVersion": 1
},
{
"id": "cb60e9b0-a9a8-4dd6-9aa3-9d22c7f5f537",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-20,
-380
],
"webhookId": "1bd05fcf-8286-491f-ae13-f0e6bff4aca6",
"parameters": {
"path": "1bd05fcf-8286-491f-ae13-f0e6bff4aca6",
"options": {
"responseCode": {
"values": {
"responseCode": 204
}
}
},
"httpMethod": "POST"
},
"typeVersion": 2
},
{
"id": "d60cfb45-df3d-4ab1-8e7e-1b2e81bc5b34",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
320,
-380
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "ask",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.command }}",
"rightValue": "/ask"
}
]
},
"renameOutput": true
},
{
"outputKey": "another",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "a0924665-de21-4d9b-a1d1-c9f41f74ee09",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.command }}",
"rightValue": "/another"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "810ac4dd-8241-4486-b183-74cbde3d58e7",
"name": "Basic LLM Chain",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
640,
-500
],
"parameters": {
"text": "={{ $json.body.text }}",
"promptType": "define"
},
"typeVersion": 1.5
},
{
"id": "f173fe2d-45e7-460c-aa33-d5509b6d59b9",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
720,
-340
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"typeVersion": 1.2
},
{
"id": "4752da4c-b013-4469-a3bc-386d3ab3d15d",
"name": "Send a Message",
"type": "n8n-nodes-base.slack",
"position": [
1120,
-460
],
"webhookId": "a37abc2a-6e8c-4c00-8543-3f313b300df6",
"parameters": {
"text": "={{ $json.text }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Webhook').item.json.body.channel_id }}"
},
"otherOptions": {
"includeLinkToWorkflow": false
}
},
"typeVersion": 2.3
},
{
"id": "c2f5dbcc-8283-47ab-b19a-810ad526d519",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
-1060
],
"parameters": {
"color": 7,
"width": 340,
"height": 400,
"content": "## 슬랙 Slash Command와 채널 메시지로 챗봇 만들기 🤖\n\n이 튜토리얼에서는 n8n을 활용해 슬랙에서 동작하는 AI 챗봇을 만드는 방법을 알려드립니다. 슬래시 커맨드를 통한 개인 메시지부터 공개 채널에서의 자동 응답까지, 실용적인 챗봇 구현 방법을 단계별로 설명합니다. 슬랙 앱 설정부터 n8n 노드 구성, 웹훅 트리거 설정, AI 봇 연동까지 하나하나 자세히 다룹니다.\n\n유튜브 링크:\nhttps://www.youtube.com/watch?v=UpudYFCWaIM\n"
},
"typeVersion": 1
},
{
"id": "4ecdfdfa-8886-47c6-b9df-ac45321b0cea",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"position": [
300,
-1060
],
"parameters": {
"color": 7,
"width": 340,
"height": 400,
"content": "## Create an AI chatbot with Slack slash commands! 🤖\n\nIn this tutorial, we'll show you how to create an AI chatbot that works in Slack using n8n. We'll explain step by step how to implement a practical chatbot, from personal messages through slash commands to automatic responses in public channels. We'll cover everything in detail, from Slack app configuration to n8n node setup, webhook trigger configuration, and AI bot integration.\n\nThe YouTube video is provided in Korean.\n\nYoutube Link:\nhttps://www.youtube.com/watch?v=UpudYFCWaIM\n"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "de554ae6-98d5-4841-9ed6-cb68d2c1bc7f",
"connections": {
"Switch": {
"main": [
[
{
"node": "Basic LLM Chain",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Basic LLM Chain": {
"main": [
[
{
"node": "Send a Message",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
}
}
}

File diff suppressed because it is too large Load Diff