8
n8n 한국어amn8n.com

Slack 다국어 어시스턴트 (Gemini 2.5 Flash 사용)

고급

이것은Miscellaneous, Multimodal AI분야의자동화 워크플로우로, 29개의 노드를 포함합니다.주로 If, Code, Switch, Webhook, HttpRequest 등의 노드를 사용하며. Gemini 2.5 Flash를 사용한 자동화된 다국어 Slack 커뮤니케이션(일본어⇄영어)

사전 요구사항
  • HTTP Webhook 엔드포인트(n8n이 자동으로 생성)
  • 대상 API의 인증 정보가 필요할 수 있음
  • Google Gemini API Key
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "name": "Slack Multilingual Assistant with Gemini 2.5 Flash",
  "tags": [],
  "nodes": [
    {
      "id": "613a274c-124d-42cb-bcea-7769e8050eb1",
      "name": "Webhook (Slack /trans)",
      "type": "n8n-nodes-base.webhook",
      "position": [
        3328,
        512
      ],
      "webhookId": "replace-with-your-slash-webhook-id",
      "parameters": {
        "path": "slack/trans",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "1f1ec470-c751-4de8-b2a8-4f9c2841139f",
      "name": "Ack (Slack에 응답)",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3584,
        416
      ],
      "parameters": {
        "options": {
          "responseCode": 200,
          "responseHeaders": {
            "entries": [
              {
                "name": "Content-Type",
                "value": "text/plain; charset=utf-8"
              }
            ]
          }
        },
        "respondWith": "text",
        "responseBody": "Translating..."
      },
      "typeVersion": 1
    },
    {
      "id": "021bfa0c-46a6-45ca-89a2-bee8f1a28270",
      "name": "Parse Slash Payload",
      "type": "n8n-nodes-base.code",
      "position": [
        3584,
        576
      ],
      "parameters": {
        "jsCode": "const payload = $json.body || $json;\nconst text = (payload.text || '').trim();\nreturn [{\n  json: {\n    text,\n    response_url: payload.response_url,\n    user_id: payload.user_id,\n    user_name: payload.user_name\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "9229c1c8-99a3-47e9-9e51-9fdf611f3d6f",
      "name": "Ack Mention Event",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3584,
        736
      ],
      "parameters": {
        "options": {
          "responseCode": 200,
          "responseHeaders": {
            "entries": [
              {
                "name": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ]
          }
        },
        "respondWith": "json",
        "responseBody": "={{ $json.body && $json.body.challenge ? {\"challenge\": $json.body.challenge } : {\"ok\": true} }}"
      },
      "typeVersion": 1
    },
    {
      "id": "59f4988f-274d-4f5c-b304-7f253d507306",
      "name": "Parse Mention Event",
      "type": "n8n-nodes-base.code",
      "position": [
        3584,
        896
      ],
      "parameters": {
        "jsCode": "/* app_mention イベント形式:\n{\n  body: {\n    event: {\n      type: 'app_mention',\n      user: 'U123',\n      text: '<@Ubot> @trans これ訳して',\n      channel: 'C123',\n      ts: '1730000000.12345',\n      thread_ts: '1730000000.12345' (optional)\n    }\n  }\n}\n*/\n\nconst body = $json.body || $json;\nconst ev = body.event || {};\n\nlet raw = ev.text || '';\n// <@U...> とか @trans を除去\nraw = raw.replace(/<@[^>]+>/g, '').replace(/@trans/gi, '').trim();\n\nconst thread_ts = ev.thread_ts || ev.ts;\n\nreturn [{\n  json: {\n    textToTranslate: raw,\n    channel: ev.channel,\n    thread_ts,\n    user_id: ev.user\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "313833d3-b896-42e3-8c85-37a5f8140e4f",
      "name": "Ack Reaction Event",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3584,
        1056
      ],
      "parameters": {
        "options": {
          "responseCode": 200,
          "responseHeaders": {
            "entries": [
              {
                "name": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ]
          }
        },
        "respondWith": "json",
        "responseBody": "={{ $json.body && $json.body.challenge ? {\"challenge\": $json.body.challenge } : {\"ok\": true} }}"
      },
      "typeVersion": 1
    },
    {
      "id": "19651cc6-1157-4baf-a330-b1d999212c32",
      "name": "Parse Reaction Event",
      "type": "n8n-nodes-base.code",
      "position": [
        3584,
        1216
      ],
      "parameters": {
        "jsCode": "/*\n  Slack reaction_added payload 例:\n  {\n    \"event\": {\n      \"type\": \"reaction_added\",\n      \"user\": \"U123456\",\n      \"reaction\": \"jp\",\n      \"item\": {\n        \"type\": \"message\",\n        \"channel\": \"C123456\",\n        \"ts\": \"1730000000.12345\"\n      }\n    }\n  }\n*/\n\nlet body = $json;\n\n// n8nのWebhookノードでは payload が body 下に入る場合と、直下に入る場合がある\nif ($json.body && typeof $json.body === 'object') {\n  body = $json.body;\n}\n\nconst ev = body.event || {};\n\n// デバッグ用ログ(必要なら一時的にON)\nconsole.log('reaction event', ev);\n\nreturn [\n  {\n    json: {\n      reactor_user: ev.user || null,\n      reaction: ev.reaction || null,\n      channel: ev.item?.channel || null,\n      message_ts: ev.item?.ts || null,\n      raw: ev\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "cc79dec9-6da6-4abb-bc92-47b01b6d1e48",
      "name": "Fetch Original Message",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3760,
        1376
      ],
      "parameters": {
        "url": "={{`https://slack.com/api/conversations.replies?channel=${$json.channel}&ts=${$json.message_ts}&limit=1`}}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "fc114495-2e73-4a78-ab32-43291dd7b326",
      "name": "Prep Reaction Translation Input",
      "type": "n8n-nodes-base.code",
      "position": [
        3936,
        1376
      ],
      "parameters": {
        "jsCode": "const eventCtx = $node['Parse Reaction Event'].json;\nconst apiRes = $json;\n\nif (!apiRes.ok || !apiRes.messages || !apiRes.messages.length) {\n  return [{ json: { skip: true, reason: 'no message found' } }];\n}\n\nconst msg = apiRes.messages[0];\nconst textToTranslate = msg.text || '';\nconst thread_ts = msg.thread_ts || msg.ts;\nconst channel = eventCtx.channel;\n\nreturn [{\n  json: {\n    textToTranslate,\n    channel,\n    thread_ts\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "b00abedc-8dd1-4193-b825-4b51b79694a5",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        3856,
        1072
      ],
      "parameters": {
        "options": {
          "temperature": 0.2,
          "maxOutputTokens": 1024
        }
      },
      "credentials": {
        "googlePalmApi": {
          "id": "kq5tDtSRmEQTrYwt",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "be154439-e6f6-4eed-9715-2fbd5d3cd9b1",
      "name": "Basic LLM Chain (/trans)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        4096,
        736
      ],
      "parameters": {
        "text": "=",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "You are a bilingual assistant for a Japanese/English mixed team.\nDetect whether the input is mainly Japanese or English.\nReturn exactly two labeled parts:\n\n[Original]\n<the original text>\n\n[Translation]\n<the translation in the OTHER language>\n\nRules:\n- Detect source language automatically (JA or EN).\n- Translate into the opposite language.\n- Do not add explanations or extra comments.\n- Keep both blocks in plain text."
            },
            {
              "type": "HumanMessagePromptTemplate",
              "message": "={{ $json.textToTranslate || $json.text }}"
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "ecbacf69-4903-4643-9398-89ab3d903609",
      "name": "Basic LLM Chain (@trans)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        4096,
        896
      ],
      "parameters": {
        "text": "=",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "You are a bilingual assistant for a Japanese/English mixed team.\nDetect whether the input is mainly Japanese or English.\nReturn exactly two labeled parts:\n\n[Original]\n<the original text>\n\n[Translation]\n<the translation in the OTHER language>\n\nRules:\n- Detect source language automatically (JA or EN).\n- Translate into the opposite language.\n- Do not add explanations or extra comments.\n- Keep both blocks in plain text."
            },
            {
              "type": "HumanMessagePromptTemplate",
              "message": "={{ $json.textToTranslate || $json.text }}"
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "adeaa1b3-fbcb-4a11-a1cc-84dc75602478",
      "name": "Basic LLM Chain (reaction)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        4096,
        1056
      ],
      "parameters": {
        "text": "=",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "You are a bilingual assistant for a Japanese/English mixed team.\nDetect whether the input is mainly Japanese or English.\nReturn exactly two labeled parts:\n\n[Original]\n<the original text>\n\n[Translation]\n<the translation in the OTHER language>\n\nRules:\n- Detect source language automatically (JA or EN).\n- Translate into the opposite language.\n- Do not add explanations or extra comments.\n- Keep both blocks in plain text."
            },
            {
              "type": "HumanMessagePromptTemplate",
              "message": "={{ $json.textToTranslate || $json.text }}"
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "c443fefb-b54e-4b7a-b97f-60f115daa471",
      "name": "Format Slack Message (/trans)",
      "type": "n8n-nodes-base.code",
      "position": [
        4400,
        736
      ],
      "parameters": {
        "jsCode": "/* /trans 用フォーマッタ\n   出力イメージ:\n   【from @後藤】\\n(日本語原文...)\\n----------\\n(英語訳...)\n*/\nconst ctx = $node['Parse Slash Payload'].json;\nconst llm = $json;\n\nlet output = llm.text || llm.output || '';\n\n// [Original] と [Translation] を分離\nlet original = '';\nlet translation = '';\nconst match = output.match(/\\[Original\\]([\\s\\S]*?)\\[Translation\\]([\\s\\S]*)/i);\nif (match) {\n  original = match[1].trim();\n  translation = match[2].trim();\n} else {\n  translation = output.trim();\n}\n\nconst fromUser = ctx.user_id ? `<@${ctx.user_id}>` : (ctx.user_name || 'someone');\nconst finalMessage = `【from ${fromUser}】\\n${original}\\n----------\\n${translation}`;\n\nreturn [{\n  json: {\n    response_url: ctx.response_url,\n    message: finalMessage\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "c939414e-b72e-4a70-a60c-809294ba8d58",
      "name": "Format Slack Message (@trans)",
      "type": "n8n-nodes-base.code",
      "position": [
        4400,
        896
      ],
      "parameters": {
        "jsCode": "/* @trans 用フォーマッタ\n   訳文だけ返す(スレッド)\n*/\nconst ctx = $node['Parse Mention Event'].json;\nconst llm = $json;\n\nlet output = llm.text || llm.output || '';\noutput = output\n  .replace(/\\[Original\\][\\s\\S]*?\\[Translation\\]/i, '')\n  .replace(/\\[Translation\\]/i, '')\n  .trim();\n\nreturn [{\n  json: {\n    channel: ctx.channel,\n    thread_ts: String(ctx.thread_ts),\n    text: output\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "05b95459-5234-479d-8455-74504d4fbfa6",
      "name": "Format Slack Message (reaction)",
      "type": "n8n-nodes-base.code",
      "position": [
        4400,
        1056
      ],
      "parameters": {
        "jsCode": "/* reaction 用フォーマッタ\n   訳文だけ返す(スレッド)\n*/\nconst ctx = $node['Prep Reaction Translation Input'].json;\nconst llm = $json;\n\nlet output = llm.text || llm.output || '';\noutput = output\n  .replace(/\\[Original\\][\\s\\S]*?\\[Translation\\]/i, '')\n  .replace(/\\[Translation\\]/i, '')\n  .trim();\n\nreturn [{\n  json: {\n    channel: ctx.channel,\n    thread_ts: String(ctx.thread_ts),\n    text: output\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "3a592c03-37b3-4d68-a22c-1b7bff70c5f1",
      "name": "Post to Slack (response_url)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4576,
        736
      ],
      "parameters": {
        "url": "={{$json.response_url}}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "response_type",
              "value": "in_channel"
            },
            {
              "name": "text",
              "value": "={{ $json.message }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "07a8ba81-4fee-4073-b8fa-48de1e829bc9",
      "name": "Post to Slack (@trans reply)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4576,
        896
      ],
      "parameters": {
        "url": "https://slack.com/api/chat.postMessage",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "channel",
              "value": "={{ $json.channel }}"
            },
            {
              "name": "text",
              "value": "={{ $json.text }}"
            },
            {
              "name": "thread_ts",
              "value": "={{ $json.thread_ts.toString() }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json; charset=utf-8"
            },
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4a426e04-11a0-4e99-b37a-0aa2580ea043",
      "name": "Post to Slack (reaction reply)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4576,
        1056
      ],
      "parameters": {
        "url": "https://slack.com/api/chat.postMessage",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "channel",
              "value": "={{$json.channel}}"
            },
            {
              "name": "text",
              "value": "={{$json.text}}"
            },
            {
              "name": "thread_ts",
              "value": "={{$json.thread_ts}}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json; charset=utf-8"
            },
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "a83c3091-3bac-4fe9-ba77-f15fd9051db3",
      "name": "How to set up",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2880,
        240
      ],
      "parameters": {
        "color": 4,
        "width": 648,
        "height": 200,
        "content": "Slack Multilingual Assistant (Gemini 2.5 Flash)\n\n🔧 Three translation modes unified in one workflow:\n1️⃣ /trans — Public bilingual announcements  \n  Format: 【from @user】 Original ---------- Translation  \n2️⃣ @trans — Mention trigger for thread translation (translation only)  \n3️⃣ 🇯🇵 / 🇺🇸 Reaction — Private on-demand translation  \n\n💡 All modes share the same Google Gemini 2.5 Flash core for automatic JA⇄EN detection."
      },
      "typeVersion": 1
    },
    {
      "id": "c5f820f6-5027-49d4-89de-a1781aa354e9",
      "name": "Webhook (Slack @trans + reaction)",
      "type": "n8n-nodes-base.webhook",
      "position": [
        2944,
        976
      ],
      "webhookId": "replace-with-your-mention-webhook-id",
      "parameters": {
        "path": "slack/mention",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "0a859374-d091-468f-bd68-ecb898b7a435",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4384,
        -16
      ],
      "parameters": {
        "color": 5,
        "width": 480,
        "height": 720,
        "content": "🔧 Create and Configure your Slack App (TransBot)\n\n1️⃣ Create App  \n → From scratch → Name it “TransBot” → Select your workspace  \n\n2️⃣ Add Bot Token Scopes in OAuth & Permissions\n • commands  \n • chat:write  \n • app_mentions:read  \n • reactions:read  \n • channels:history  \n • groups:history (optional for private channels)\n\n3️⃣ Event Subscriptions  \n Enable Events ✅  \n Request URL →  \n   https://<your-n8n-domain>/webhook/slack/mention  \n Once verified, subscribe to bot events:  \n   – app_mention  \n   – message.channels  \n and subscribe on behalf of users:  \n   – reaction_added  \n\n4️⃣ Slash Command  \n Command name: `/trans`  \n Request URL →  \n   https://<your-n8n-domain>/webhook/slack/trans  \n Short desc: “Translate text JA⇄EN with Gemini 2.5 Flash”\n\n5️⃣ Install or Reinstall to Workspace  \n Copy the new Bot User OAuth Token (xoxb-…)  \n and paste it into the HTTP Request headers in n8n  \n (`Authorization: Bearer YOUR_TOKEN_HERE`)\n\n6️⃣ Invite the bot to your channels:  \n `/invite @TransBot`"
      },
      "typeVersion": 1
    },
    {
      "id": "3e9045e2-e73b-4a23-a30a-9ecc27a16ed8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3824,
        240
      ],
      "parameters": {
        "color": 3,
        "width": 480,
        "height": 368,
        "content": "🔁 Workflow Architecture\n\n• Webhooks:\n  – /slack/trans     → Slash Command  \n  – /slack/mention  → app_mention & reaction_added events  \n\n• Language Model: Google Gemini 2.5 Flash  \n• Logic:\n  – Detect source language (JA/EN)  \n  – Translate to the opposite language  \n  – Format Slack message per mode  \n\n• Outputs:\n  – /trans → Posts bilingual message to channel (via response_url)  \n  – @trans → Replies in thread with translation only  \n  – Reaction → Replies in thread with translation only (for reader)\n\nAll three paths share the same Gemini core."
      },
      "typeVersion": 1
    },
    {
      "id": "11a71607-a154-4a2a-8903-c896f4462551",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2880,
        1200
      ],
      "parameters": {
        "color": 3,
        "width": 480,
        "height": 272,
        "content": "🚨 Common Errors & Fixes\n\n❌ invalid_auth  \n → Using an old token or bot not invited to channel  \n  Fix: Reinstall app / use latest xoxb token / `/invite @TransBot`\n\n❌ missing_scope  \n → A required scope is missing  \n  Fix: Add scope in OAuth & Permissions → Save → Reinstall\n\n❌ no message found  \n → Reaction event can’t fetch original text  \n  Fix: Add `groups:history` scope for private channels"
      },
      "typeVersion": 1
    },
    {
      "id": "a6cce3e2-180b-45ee-ba6d-b81e1bcdb5b5",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4336,
        1328
      ],
      "parameters": {
        "color": 4,
        "width": 528,
        "height": 144,
        "content": "✅ Workflow is Active in n8n  \n✅ Slack Event Subscription Request URL shows “Verified ✅”  \n✅ Bot Token includes chat:write, channels:history, reactions:read  \n✅ /trans Slash Command responds with “Translating...” then Gemini output  \n✅ @trans mention replies in thread with translation only  \n✅ 🇯🇵/🇺🇸 reaction adds translation reply in thread"
      },
      "typeVersion": 1
    },
    {
      "id": "88bac316-9994-466b-8f75-b7d2f8cf1467",
      "name": "Route by Event Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        3328,
        976
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "1927dafe-a218-44de-a76b-47eefeabc55e",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.event_type}}",
                    "rightValue": "app_mention"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "adda84a4-9099-4b3d-8ef2-4968c8ab8670",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.event_type}}",
                    "rightValue": "reaction_added"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.3
    },
    {
      "id": "1a9163a3-bcab-475d-8372-de95de586e4f",
      "name": "Skip Reaction When No Message Found",
      "type": "n8n-nodes-base.if",
      "position": [
        4112,
        1376
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "922fba50-9c9e-49c7-9bb0-6efe56e2f216",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{$json.skip}}",
              "rightValue": "true"
            },
            {
              "id": "d98fdf6c-83c4-4a66-8bdf-6d5854131727",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{$json.textToTranslate}}",
              "rightValue": ""
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "1eb61e22-6993-4fd0-ac72-0f9b0fbb976d",
      "name": "Filter Reaction Type",
      "type": "n8n-nodes-base.code",
      "position": [
        3584,
        1376
      ],
      "parameters": {
        "jsCode": "/*\n  :jp: / :jp-flag: / :flag-jp: / :us: / :flag-us: などに対応\n  → それ以外のリアクションはスキップ\n*/\n\nconst allowedPatterns = ['jp', 'us'];\nconst reaction = ($json.reaction || '').toLowerCase();\n\n// 部分一致チェック\nconst isAllowed = allowedPatterns.some(p => reaction.includes(p));\n\nif (!isAllowed) {\n  return [{ json: { skip: true, reason: `irrelevant reaction: ${reaction}` } }];\n}\n\nreturn [{ json: $json }];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "e3aa1071-f785-4338-a8f4-ae20384ae621",
      "name": "Detect Slack Event Type",
      "type": "n8n-nodes-base.code",
      "position": [
        3136,
        976
      ],
      "parameters": {
        "jsCode": "const event = $json.body?.event || $json.event;\nreturn [{ json: { event_type: event.type, event } }];"
      },
      "typeVersion": 2
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "59f4988f-274d-4f5c-b304-7f253d507306": {
      "main": [
        [
          {
            "node": "ecbacf69-4903-4643-9398-89ab3d903609",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "021bfa0c-46a6-45ca-89a2-bee8f1a28270": {
      "main": [
        [
          {
            "node": "be154439-e6f6-4eed-9715-2fbd5d3cd9b1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "88bac316-9994-466b-8f75-b7d2f8cf1467": {
      "main": [
        [
          {
            "node": "9229c1c8-99a3-47e9-9e51-9fdf611f3d6f",
            "type": "main",
            "index": 0
          },
          {
            "node": "59f4988f-274d-4f5c-b304-7f253d507306",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "313833d3-b896-42e3-8c85-37a5f8140e4f",
            "type": "main",
            "index": 0
          },
          {
            "node": "19651cc6-1157-4baf-a330-b1d999212c32",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1eb61e22-6993-4fd0-ac72-0f9b0fbb976d": {
      "main": [
        [
          {
            "node": "cc79dec9-6da6-4abb-bc92-47b01b6d1e48",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "19651cc6-1157-4baf-a330-b1d999212c32": {
      "main": [
        [
          {
            "node": "1eb61e22-6993-4fd0-ac72-0f9b0fbb976d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cc79dec9-6da6-4abb-bc92-47b01b6d1e48": {
      "main": [
        [
          {
            "node": "fc114495-2e73-4a78-ab32-43291dd7b326",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "613a274c-124d-42cb-bcea-7769e8050eb1": {
      "main": [
        [
          {
            "node": "1f1ec470-c751-4de8-b2a8-4f9c2841139f",
            "type": "main",
            "index": 0
          },
          {
            "node": "021bfa0c-46a6-45ca-89a2-bee8f1a28270",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e3aa1071-f785-4338-a8f4-ae20384ae621": {
      "main": [
        [
          {
            "node": "88bac316-9994-466b-8f75-b7d2f8cf1467",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "be154439-e6f6-4eed-9715-2fbd5d3cd9b1": {
      "main": [
        [
          {
            "node": "c443fefb-b54e-4b7a-b97f-60f115daa471",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ecbacf69-4903-4643-9398-89ab3d903609": {
      "main": [
        [
          {
            "node": "c939414e-b72e-4a70-a60c-809294ba8d58",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b00abedc-8dd1-4193-b825-4b51b79694a5": {
      "ai_languageModel": [
        [
          {
            "node": "adeaa1b3-fbcb-4a11-a1cc-84dc75602478",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "ecbacf69-4903-4643-9398-89ab3d903609",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "be154439-e6f6-4eed-9715-2fbd5d3cd9b1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "adeaa1b3-fbcb-4a11-a1cc-84dc75602478": {
      "main": [
        [
          {
            "node": "05b95459-5234-479d-8455-74504d4fbfa6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c443fefb-b54e-4b7a-b97f-60f115daa471": {
      "main": [
        [
          {
            "node": "3a592c03-37b3-4d68-a22c-1b7bff70c5f1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c939414e-b72e-4a70-a60c-809294ba8d58": {
      "main": [
        [
          {
            "node": "07a8ba81-4fee-4073-b8fa-48de1e829bc9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "05b95459-5234-479d-8455-74504d4fbfa6": {
      "main": [
        [
          {
            "node": "4a426e04-11a0-4e99-b37a-0aa2580ea043",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fc114495-2e73-4a78-ab32-43291dd7b326": {
      "main": [
        [
          {
            "node": "1a9163a3-bcab-475d-8372-de95de586e4f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c5f820f6-5027-49d4-89de-a1781aa354e9": {
      "main": [
        [
          {
            "node": "e3aa1071-f785-4338-a8f4-ae20384ae621",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1a9163a3-bcab-475d-8372-de95de586e4f": {
      "main": [
        [
          {
            "node": "adeaa1b3-fbcb-4a11-a1cc-84dc75602478",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

고급 - 기타, 멀티모달 AI

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
고급
노드 수29
카테고리2
노드 유형9
난이도 설명

고급 사용자를 위한 16+개 노드의 복잡한 워크플로우

저자
Tomohiro Goto

Tomohiro Goto

@taoo

Creative Technologist blending design and automation to make work a little more fun. Exploring how AI and workflow tools like n8n can bring creativity into everyday work.

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34