Skip to content

Instantly share code, notes, and snippets.

@alnutile
Created September 25, 2025 19:16
Show Gist options
  • Save alnutile/ad21bf18a809737031f4c340ec41b6c8 to your computer and use it in GitHub Desktop.
Save alnutile/ad21bf18a809737031f4c340ec41b6c8 to your computer and use it in GitHub Desktop.
Switch Node N8N video is here https://youtu.be/UkOTBoxWCxg
{
"nodes": [
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.emailReadImap",
"typeVersion": 2.1,
"position": [
-336,
32
],
"id": "a05fce30-a2e6-4de7-89b0-5872c4ce1cd0",
"name": "Email Routing",
"credentials": {
"imap": {
"id": "07zrgCACJNPeozzF",
"name": "Automation Example DailyAi"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.textHtml }}",
"hasOutputParser": true,
"options": {
"systemMessage": "Your role is to route the email to whatever route it needs here are the options below.\n\nsupport\nbilling\nsales\n\n### JSON FORMAT\n\n{\n \"route\": \"<string>\"\n}"
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2.2,
"position": [
-80,
32
],
"id": "817a0e58-acf2-4999-977b-408a5ca83fe0",
"name": "AI Agent"
},
{
"parameters": {
"model": "qwen/qwen3-32b",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatGroq",
"typeVersion": 1,
"position": [
-96,
304
],
"id": "ebd75cc2-2235-459c-b032-f8540512cecb",
"name": "Groq Chat Model",
"credentials": {
"groqApi": {
"id": "5VAmIAc6eGmXPmsp",
"name": "Groq account"
}
}
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"leftValue": "={{ $json.output.route }}",
"rightValue": "support",
"operator": {
"type": "string",
"operation": "equals"
},
"id": "95aa4008-b3e9-4661-886d-8da792c26e70"
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "support"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "1638d012-70ea-411f-b50e-043e5aba577e",
"leftValue": "={{ $json.output.route }}",
"rightValue": "billing",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "billing"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "1b2c8dfa-2968-412e-8867-37ad31d40c0d",
"leftValue": "={{ $json.output.route }}",
"rightValue": "sales",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "sales"
}
]
},
"options": {
"fallbackOutput": 0
}
},
"type": "n8n-nodes-base.switch",
"typeVersion": 3.2,
"position": [
288,
16
],
"id": "e0e1cf68-949a-4316-ac13-abd5c7cbadd7",
"name": "Switch"
},
{
"parameters": {
"jsonSchemaExample": "{\n \"route\": \"<string>\"\n}",
"autoFix": true
},
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"typeVersion": 1.3,
"position": [
96,
240
],
"id": "33a319df-10fd-40d1-a692-fd96cbb2693c",
"name": "Structured Output Parser"
}
],
"connections": {
"Email Routing": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Groq Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Structured Output Parser",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
}
},
"pinData": {
"Email Routing": [
{
"textHtml": "<div dir=\"ltr\"><div><div class=\"gmail_default\" style=\"font-size:small\">I need urgent support help รฐยŸย˜ยจ</div><br clear=\"all\"></div><div><div dir=\"ltr\" class=\"gmail_signature\" data-smartmail=\"gmail_signature\"><div dir=\"ltr\"><div dir=\"ltr\"><div dir=\"ltr\"><div><div style=\"color:rgb(34,34,34)\">Alfredร‚ย Nutile</div><div style=\"color:rgb(34,34,34)\"><a href=\"https://dailyai.studio/solutions\" style=\"color:rgb(17,85,204)\" target=\"_blank\">https://dailyai.studio/solutions</a></div><div style=\"color:rgb(34,34,34)\"><a href=\"https://calendly.com/alfrednutile/15min\" style=\"color:rgb(17,85,204)\" target=\"_blank\">https://calendly.com/alfrednutile/15min</a>ร‚ย &lt;--for appointments<br><a href=\"https://bit.ly/m/alnutile\" style=\"color:rgb(17,85,204)\" target=\"_blank\">https://bit.ly/m/alnutile</a>ร‚ย &lt;-- for all my other links<br></div><div style=\"color:rgb(34,34,34)\">413.230.4767</div></div><div><br></div></div></div></div></div></div></div>\r\n",
"textPlain": "I need urgent support help รฐยŸย˜ยจ\r\n\r\nAlfred Nutile\r\nhttps://dailyai.studio/solutions\r\nhttps://calendly.com/alfrednutile/15min <--for appointments\r\nhttps://bit.ly/m/alnutile <-- for all my other links\r\n413.230.4767\r\n",
"metadata": {
"return-path": "<[email protected]>",
"delivered-to": "[email protected]",
"received": "from heracles.mxrouting.net\tby heracles.mxrouting.net with LMTP\tid yH7zBnID0mifRRIAB5j/qg\t(envelope-from <[email protected]>)\tfor <[email protected]>; Tue, 23 Sep 2025 02:18:26 +0000",
"envelope-to": "[email protected]",
"delivery-date": "Tue, 23 Sep 2025 02:18:26 +0000",
"dkim-signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758593904; x=1759198704; darn=dailyai.studio; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=0ueVAW3Hk5YihNnoFAMUQqFQu3HU9tQZzB0M9/ET2Jw=; b=NEiTs5szkC0kJfC/dQOMdeWtEV2d5+4mhmw/mBTZTR7b8RiMLY9cNXWfySxjUJvB4s a0rxZgfCUYYsK5lp2O+/Eh1KEdRCkC7Rt+j+iLgh9Lj00zipET2oaBkhLX22z7rVDTki 1oZu6BjBw4K6Etf8OJsWcVgUmbOq9xaXfZDmWv0JHnQnJqGII7qsKTq4QJlQpbMk60rt PuO5D0gT+Yo7RDlEDFSWfrXgumhK/5GpHJOd+E9D1mkMSVQqrtdO7s9Fp5oUOrYQSIvB 9izmqhDcOhCQ3KP2JK739FWDQC0CMMbLFu/Mr92ki+Dml7aQBw8y4FXUM38UKF/eza/b u6yw==",
"x-google-dkim-signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758593904; x=1759198704; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=0ueVAW3Hk5YihNnoFAMUQqFQu3HU9tQZzB0M9/ET2Jw=; b=lvBWlx4JxRAnC5/2OQWLMfWsGJzRjzWkAqySRS3AwBnmHxZEICh8UeGkPQQGGepj7/ xqtld4CZdBjFtmpH0r8iT59JVN1e3j9KAXPa5pQgqLHgQynKNNDyDRlvvEBf1EqLx1DP 90080uKYRIGME4muiJkNuQnZZUYSp4sGenWb1HkAa2E5USBrdZC4n0dsz1QiwN1+/qiP Zj015WwhWO2oyVDrXO7TDry5zd7ZwwVHbol2G1+lkqPxl8xm2VsHEX1jZW7sm6NP1uP4 dxdD5KvQnKB+mHRo+LRZ4U4u5bhHQQe7CELhpmdphQe+ga2sEHXnjLmMifcPR4OU6ISK xrQw==",
"x-gm-message-state": "AOJu0Yzx4t9J8ipUdIbFtcK7NQ5kLM46eO3WwFakZs/gsWVyCg2Ww8th\tLUfVEWxlC3EOKAzxgZIXMNVnaIC7yShwhU0I/ZVZ0UETxfjgN8+1f5k+6D1UGyXNf6qZKpoECzK\tQZtWlnqnU3ncjaVjngYzsGZd8TEym5KBqzbMS",
"x-gm-gg": "ASbGncs/ly6usTtjA7tWYycJ73d8wh1MDOLZzhZZmGkrhcbb1FdtN3Vq2MZHZf2pP02\tuG7ZWhWubw1j1Q3JRfoP00gPRNzaYhoX44u0ZuHEDts8B/2f7Y6alvMf53fEMowTQneqZeoO3AC\tF5Z/TIdY3SjLzxB8gbqRkpMTtSEQbAXK2ryQ+XjPDg6G52v6EDQ+/4SVpp6JIXgkAv+xtUCbDYo\tW02tJi+WRpev49zJyw5+NQOce0W3zyy5wGcuIg=",
"x-google-smtp-source": "AGHT+IErBZNo2vxM8230wwyld52/aIBq3xgAvZHIe2Gfq6rJ5lP7bxlqCOyl+eagrUKN/tMEIQ3A2JIPgvNIuNpqbSY=",
"x-received": "by 2002:a17:903:4b04:b0:269:8407:5ae3 with SMTP id d9443c01a7336-27cc6e417bcmr11455155ad.54.1758593903520; Mon, 22 Sep 2025 19:18:23 -0700 (PDT)",
"mime-version": "1.0",
"x-gm-features": "AS18NWCwnSxmWdcFKpZKuJAbowYUakBxoOujWVeLXkdp8GUaWrsUDakearMcesM",
"message-id": "<CALpppRhfTyUXkdFKG7ki+U1m1BO5nJ+Mxdghfx=SHd80+zPX3A@mail.gmail.com>",
"content-type": "multipart/alternative; boundary=\"000000000000ec714c063f6e8cec\"",
"x-dkim": "signer='gmail.com' status='pass' reason=''",
"dkimcheck": "Server passes DKIM test, 0 Spam score",
"x-spam-score": "1.3 (+)",
"x-spam-report": "Spam detection software, running on the system \"heracles.mxrouting.net\", has performed the tests listed below against this email. Information: https://mxroutedocs.com/directadmin/spamfilters/ --- Content analysis details: (1.3 points) --- pts rule name description ---- ---------------------- ----------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URI: calendly.com] [URI: bit.ly] [URI: dailyai.studio] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [alfrednutile(at)gmail.com] 1.5 HTML_MESSAGE BODY: HTML included in message -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.169 listed in wl.mailspike.net] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.215.169 listed in sa-trusted.bondedsender.org] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.215.169 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.215.169 listed in bl.score.senderscore.com] 0.0 RCVD_IN_DNSWL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to DNSWL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block for more information. [209.85.215.169 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders",
"spamtally": "Final spam score: 13"
},
"attributes": {
"uid": 5
},
"from": "Alfred Nutile <[email protected]>",
"date": "Mon, 22 Sep 2025 22:18:10 -0400",
"subject": "Help with Support",
"to": "[email protected]"
}
]
},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "b77b374d91a001765a8bf2832badc1f8fcc5407c99c4c6f3f68d6413d663ef83"
}
}
{
"nodes": [
{
"parameters": {
"formTitle": "Testing the Switch Node",
"formDescription": "Woot lets see how this works!",
"formFields": {
"values": [
{
"fieldLabel": "Choose The type of Story You Want",
"fieldType": "dropdown",
"fieldOptions": {
"values": [
{
"option": "Billing Question"
},
{
"option": "Technical Support"
},
{
"option": "Sales Inquiry"
}
]
}
}
]
},
"responseMode": "lastNode",
"options": {}
},
"type": "n8n-nodes-base.formTrigger",
"typeVersion": 2.2,
"position": [
-288,
-48
],
"id": "40e7eb86-d32d-4e4c-ab94-83fe64988fc7",
"name": "On form submission",
"webhookId": "b1df791a-d35d-4d07-aa93-f0dc20c3aa7a"
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"leftValue": "={{ $json[\"Choose The type of Story You Want\"] }}",
"rightValue": "Billing Question",
"operator": {
"type": "string",
"operation": "equals"
},
"id": "4ff50c97-0a1f-49b7-8711-b20a3d432a31"
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "Billing Question"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "c0403bce-2b1c-478c-9a8f-893c63d640c1",
"leftValue": "={{ $json[\"Choose The type of Story You Want\"] }}",
"rightValue": "Technical Support",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "Technical Support"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "13ff6af9-72db-4e26-b170-dd5083e5c6bc",
"leftValue": "={{ $json[\"Choose The type of Story You Want\"] }}",
"rightValue": "Sales Inquiry",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "Sales Inquiry"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.switch",
"typeVersion": 3.2,
"position": [
-80,
-64
],
"id": "7bca299c-3cde-4045-86e5-347453a2ef15",
"name": "Switch2"
},
{
"parameters": {
"formFields": {
"values": [
{
"fieldLabel": "What is your bill number",
"fieldType": "number",
"placeholder": "12345",
"requiredField": true
}
]
},
"options": {}
},
"type": "n8n-nodes-base.form",
"typeVersion": 1,
"position": [
208,
-176
],
"id": "f511743c-fe84-40b7-ad58-d2722e502de4",
"name": "Form",
"webhookId": "9d1b8baa-3e9b-414c-9767-26028983c445"
},
{
"parameters": {
"content": "Now for the form switch so we can go from form to form as the user makes choices\n\nThe form is here \nhttps://n8n-do.dailyai.studio/form/b1df791a-d35d-4d07-aa93-f0dc20c3aa7a",
"width": 528
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
-320
],
"typeVersion": 1,
"id": "c104dba8-484b-45ec-81b5-e227e62a4cc0",
"name": "Sticky Note"
},
{
"parameters": {
"formFields": {
"values": [
{
"fieldLabel": "Explain your Issue",
"fieldType": "textarea",
"placeholder": "When I click the button nothing works ๐Ÿ˜จ๐Ÿ˜จ๐Ÿ˜จ",
"requiredField": true
},
{
"fieldLabel": "Your Email",
"fieldType": "email",
"placeholder": "[email protected]",
"requiredField": true
}
]
},
"options": {}
},
"type": "n8n-nodes-base.form",
"typeVersion": 1,
"position": [
384,
-48
],
"id": "a0679d0a-58d5-430a-893b-1863e4430100",
"name": "Form1",
"webhookId": "9d1b8baa-3e9b-414c-9767-26028983c445"
},
{
"parameters": {
"formFields": {
"values": [
{
"fieldLabel": "Choose what you want to buy",
"fieldType": "dropdown",
"fieldOptions": {
"values": [
{
"option": "Solis Pock RV"
},
{
"option": "Lamborghini "
},
{
"option": "Tesla"
}
]
},
"requiredField": true
},
{
"fieldLabel": "Your Email",
"fieldType": "email",
"placeholder": "[email protected]",
"requiredField": true
}
]
},
"options": {}
},
"type": "n8n-nodes-base.form",
"typeVersion": 1,
"position": [
208,
96
],
"id": "ab5a3805-ba0b-4fd6-a54a-1c2c0ee9afeb",
"name": "Form2",
"webhookId": "9d1b8baa-3e9b-414c-9767-26028983c445"
}
],
"connections": {
"On form submission": {
"main": [
[
{
"node": "Switch2",
"type": "main",
"index": 0
}
]
]
},
"Switch2": {
"main": [
[
{
"node": "Form",
"type": "main",
"index": 0
}
],
[
{
"node": "Form1",
"type": "main",
"index": 0
}
],
[
{
"node": "Form2",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {
"On form submission": [
{
"Choose The type of Story You Want": "Billing Question",
"submittedAt": "2025-09-25T07:54:33.428-04:00",
"formMode": "production"
}
]
},
"meta": {
"instanceId": "b77b374d91a001765a8bf2832badc1f8fcc5407c99c4c6f3f68d6413d663ef83"
}
}
{
"nodes": [
{
"parameters": {
"trigger": [
"app_mention"
],
"watchWorkspace": true,
"options": {
"resolveIds": true
}
},
"type": "n8n-nodes-base.slackTrigger",
"typeVersion": 1,
"position": [
-608,
64
],
"id": "4fef3623-c09c-4220-8b40-6da3f1ef4e42",
"name": "Slack Trigger",
"webhookId": "f3fe2462-e8bf-4717-856a-c4566a880fde",
"credentials": {
"slackApi": {
"id": "OFSdaIQWCvHJrPMJ",
"name": "AppHatchery"
}
}
},
{
"parameters": {
"content": "switch to \"Route\" incoming requests\n\n",
"height": 112,
"width": 656
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-608,
-96
],
"typeVersion": 1,
"id": "d666f85e-919f-422a-b4ac-12659a19f514",
"name": "Sticky Note"
},
{
"parameters": {
"content": "switch to deal with different API status results",
"width": 640,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-608,
304
],
"typeVersion": 1,
"id": "17fdc0d8-2f96-4621-ae74-15e51f4b57c2",
"name": "Sticky Note1"
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"leftValue": "={{ $json.channel_resolved }}",
"rightValue": "support-channel",
"operator": {
"type": "string",
"operation": "equals"
},
"id": "798bc804-8663-4a7e-838a-7443d61886ff"
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "support-channel"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "3a24fa85-9672-413b-a11d-bdf0fa9d7aaf",
"leftValue": "={{ $json.channel_resolved }}",
"rightValue": "bot-testing",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "bot-testing"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "0728a886-e486-41e4-8e1d-c4a2427f03c2",
"leftValue": "={{ $json.channel_resolved }}",
"rightValue": "human-in-the-loop",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "human-in-to-loop"
}
]
},
"options": {
"fallbackOutput": "extra"
}
},
"type": "n8n-nodes-base.switch",
"typeVersion": 3.2,
"position": [
-400,
32
],
"id": "db2944a5-c075-43a9-8c78-625f4c7bbdb2",
"name": "Switch"
},
{
"parameters": {
"url": "https://n8n-do.dailyai.studio/webhook/a6897da9-44f0-455c-9ba1-7cd8b472b56f",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-384,
496
],
"id": "11bde182-8631-4874-b731-51bb4f11bae3",
"name": "HTTP Request"
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"leftValue": "={{ $json.status }}",
"rightValue": "completed",
"operator": {
"type": "string",
"operation": "equals"
},
"id": "15654d24-f65d-4dcf-9e23-ea3c9cf741a6"
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "completed"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "f75e04fa-4aba-403b-b928-ba0f036f5d49",
"leftValue": "={{ $json.status }}",
"rightValue": "(pending|running)",
"operator": {
"type": "string",
"operation": "regex"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "running"
}
]
},
"options": {
"fallbackOutput": "extra"
}
},
"type": "n8n-nodes-base.switch",
"typeVersion": 3.2,
"position": [
224,
496
],
"id": "73b94988-3a35-4640-ad16-a02221976b6d",
"name": "Switch1"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "34f96b47-f233-49b5-88c5-3d5532235c3f",
"leftValue": "",
"rightValue": "",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
256,
128
],
"id": "40656cc2-7d75-440b-b840-090034b6b51c",
"name": "If"
},
{
"parameters": {
"content": "IF falls short \njust not enough options\nIf not a yes or no results to check",
"height": 368,
"width": 288,
"color": 3
},
"type": "n8n-nodes-base.stickyNote",
"position": [
208,
-96
],
"typeVersion": 1,
"id": "c5163e09-2c19-4910-a3a5-6c37f84f6da4",
"name": "Sticky Note2"
},
{
"parameters": {
"operation": "sendAndWait",
"select": "channel",
"channelId": {
"__rl": true,
"value": "={{ $json.channel }}",
"mode": "id"
},
"message": "Pick a number 1-5",
"responseType": "customForm",
"formFields": {
"values": [
{
"fieldLabel": "number",
"fieldType": "number",
"requiredField": true
}
]
},
"options": {
"messageButtonLabel": "Click to Respond"
}
},
"type": "n8n-nodes-base.slack",
"typeVersion": 2.3,
"position": [
-64,
80
],
"id": "98757526-3696-46f7-87db-8e0666e3dd33",
"name": "Send message and wait for response",
"webhookId": "56b2bf64-07f5-4021-b49a-93298a2aeda5",
"credentials": {
"slackApi": {
"id": "OFSdaIQWCvHJrPMJ",
"name": "AppHatchery"
}
}
},
{
"parameters": {
"httpMethod": "POST",
"path": "slack/interactivity",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2.1,
"position": [
704,
48
],
"id": "f06105d7-249c-4b94-8dd0-b9cc7b6bf6c3",
"name": "Slack Response",
"webhookId": "73abd6b9-150d-4c06-9e84-a113b2971e8c"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "a0c8520a-2b40-4774-a101-2756c40fa68f",
"name": "body.payload",
"value": "={{ $json.body.payload }}",
"type": "object"
}
]
},
"includeOtherFields": true,
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
912,
48
],
"id": "0d19e636-115b-41d0-a2b0-c9bb5998b4a3",
"name": "Edit Fields"
},
{
"parameters": {
"content": "Respond to webhook",
"height": 80,
"width": 352
},
"type": "n8n-nodes-base.stickyNote",
"position": [
688,
-96
],
"typeVersion": 1,
"id": "bf216d5c-6177-4256-9114-d05f73449586",
"name": "Sticky Note3"
},
{
"parameters": {
"content": "๐Ÿ‘‰ switch to deal with different Form Entries\nsee https://n8n-do.dailyai.studio/workflow/r6Nl4r60sQn4kOYJ\nsince I needed a separate workflow for it.",
"width": 640,
"color": 3
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-592,
896
],
"typeVersion": 1,
"id": "c31f3998-dae9-4677-b8a7-7de843110bce",
"name": "Sticky Note4"
},
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-608,
496
],
"id": "b7b67007-14d0-4393-b90c-1c30f8a3bddc",
"name": "Api Status Example"
},
{
"parameters": {
"content": "๐Ÿ‘‰ switch to deal with Emails\nsee https://n8n-do.dailyai.studio/workflow/KhwXz479PXgUdvxV/a05fce\nsince I needed a separate workflow for it.",
"width": 640,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-592,
688
],
"typeVersion": 1,
"id": "63d47205-8da5-488d-ab01-81ead5837db6",
"name": "Sticky Note5"
}
],
"connections": {
"Slack Trigger": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[],
[],
[
{
"node": "Send message and wait for response",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[]
]
},
"Slack Response": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Api Status Example": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {
"Slack Trigger": [
{
"user": "U02NC4UL2",
"type": "app_mention",
"ts": "1758799645.851319",
"client_msg_id": "38f834a2-8104-49ce-b41c-ff4194ee18a6",
"text": "<@U09GYTCS6QH> hello",
"team": "T02NC4UL0",
"blocks": [
{
"type": "rich_text",
"block_id": "Oi7z0",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "user",
"user_id": "U09GYTCS6QH"
},
{
"type": "text",
"text": " hello"
}
]
}
]
}
],
"channel": "C09GKFJTL4A",
"event_ts": "1758799645.851319",
"user_resolved": "alfrednutile",
"channel_resolved": "human-in-the-loop"
}
],
"Slack Response": [
{
"headers": {
"connection": "upgrade",
"host": "n8n-do.dailyai.studio",
"x-real-ip": "54.145.163.17",
"x-forwarded-for": "54.145.163.17",
"x-forwarded-proto": "https",
"content-length": "2571",
"user-agent": "Slackbot 1.0 (+https://api.slack.com/robots)",
"accept-encoding": "gzip,deflate",
"accept": "application/json,*/*",
"x-slack-signature": "v0=86cc81cb7277241e5c8b4ea37969e8464f6eb40fef2c86ca48fb408ba5155b42",
"x-slack-request-timestamp": "1758588702",
"content-type": "application/x-www-form-urlencoded"
},
"params": {},
"query": {},
"body": {
"payload": "{\"type\":\"block_actions\",\"user\":{\"id\":\"U02NC4UL2\",\"username\":\"alfrednutile\",\"name\":\"alfrednutile\",\"team_id\":\"T02NC4UL0\"},\"api_app_id\":\"A09GYSP0D6D\",\"token\":\"juesolh9zsT9SuiuFeaaTTTB\",\"container\":{\"type\":\"message\",\"message_ts\":\"1758588695.579219\",\"channel_id\":\"C09GKFJTL4A\",\"is_ephemeral\":false},\"trigger_id\":\"9563569905622.2760164680.9fbb31e741e5df8487c402e242cf2377\",\"team\":{\"id\":\"T02NC4UL0\",\"domain\":\"the-app-hatchery\"},\"enterprise\":null,\"is_enterprise_install\":false,\"channel\":{\"id\":\"C09GKFJTL4A\",\"name\":\"privategroup\"},\"message\":{\"user\":\"U09GYTCS6QH\",\"type\":\"message\",\"ts\":\"1758588695.579219\",\"bot_id\":\"B09GYTCS63B\",\"app_id\":\"A09GYSP0D6D\",\"text\":\"Pick a number 1-5 Click to Respond button\",\"team\":\"T02NC4UL0\",\"blocks\":[{\"type\":\"divider\",\"block_id\":\"mwhJc\"},{\"type\":\"section\",\"block_id\":\"riJLx\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"Pick a number 1-5\",\"verbatim\":false}},{\"type\":\"section\",\"block_id\":\"2bqL8\",\"text\":{\"type\":\"plain_text\",\"text\":\" \",\"emoji\":true}},{\"type\":\"divider\",\"block_id\":\"AWADL\"},{\"type\":\"actions\",\"block_id\":\"6XeHR\",\"elements\":[{\"type\":\"button\",\"action_id\":\"Wa5bA\",\"text\":{\"type\":\"plain_text\",\"text\":\"Click to Respond\",\"emoji\":true},\"style\":\"primary\",\"url\":\"https:\\/\\/n8n-do.dailyai.studio\\/webhook-waiting\\/63074\\/98757526-3696-46f7-87db-8e0666e3dd33?approved=true&signature=2d0b0010748bfccd0e7b4445734e00c17e2c8a4e88429841deba96dd8876c6f7\"}]}]},\"state\":{\"values\":{}},\"response_url\":\"https:\\/\\/hooks.slack.com\\/actions\\/T02NC4UL0\\/9563569865734\\/S0dGsRFrNwYoQAxENXYzzM0V\",\"actions\":[{\"action_id\":\"Wa5bA\",\"block_id\":\"6XeHR\",\"text\":{\"type\":\"plain_text\",\"text\":\"Click to Respond\",\"emoji\":true},\"style\":\"primary\",\"type\":\"button\",\"action_ts\":\"1758588702.704577\"}]}"
},
"webhookUrl": "https://n8n-do.dailyai.studio/webhook/slack/interactivity",
"executionMode": "production"
}
]
},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "b77b374d91a001765a8bf2832badc1f8fcc5407c99c4c6f3f68d6413d663ef83"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment