{
  "name": "Automate multilingual Slack communication (JA ⇄ EN) with Gemini 2.5 Flash",
  "nodes": [
    {
      "id": "613a274c-124d-42cb-bcea-7769e8050eb1",
      "name": "Webhook (Slack /trans)",
      "type": "n8n-nodes-base.webhook",
      "position": [
        3328,
        512
      ]
    },
    {
      "id": "1f1ec470-c751-4de8-b2a8-4f9c2841139f",
      "name": "Ack (Respond to Slack)",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3584,
        416
      ]
    },
    {
      "id": "021bfa0c-46a6-45ca-89a2-bee8f1a28270",
      "name": "Parse Slash Payload",
      "type": "n8n-nodes-base.code",
      "position": [
        3584,
        576
      ]
    },
    {
      "id": "9229c1c8-99a3-47e9-9e51-9fdf611f3d6f",
      "name": "Ack Mention Event",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3584,
        736
      ]
    },
    {
      "id": "59f4988f-274d-4f5c-b304-7f253d507306",
      "name": "Parse Mention Event",
      "type": "n8n-nodes-base.code",
      "position": [
        3584,
        896
      ]
    },
    {
      "id": "313833d3-b896-42e3-8c85-37a5f8140e4f",
      "name": "Ack Reaction Event",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3584,
        1056
      ]
    },
    {
      "id": "19651cc6-1157-4baf-a330-b1d999212c32",
      "name": "Parse Reaction Event",
      "type": "n8n-nodes-base.code",
      "position": [
        3584,
        1216
      ]
    },
    {
      "id": "cc79dec9-6da6-4abb-bc92-47b01b6d1e48",
      "name": "Fetch Original Message",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3760,
        1376
      ]
    },
    {
      "id": "fc114495-2e73-4a78-ab32-43291dd7b326",
      "name": "Prep Reaction Translation Input",
      "type": "n8n-nodes-base.code",
      "position": [
        3936,
        1376
      ]
    },
    {
      "id": "b00abedc-8dd1-4193-b825-4b51b79694a5",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        3856,
        1072
      ]
    },
    {
      "id": "be154439-e6f6-4eed-9715-2fbd5d3cd9b1",
      "name": "Basic LLM Chain (/trans)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        4096,
        736
      ]
    },
    {
      "id": "ecbacf69-4903-4643-9398-89ab3d903609",
      "name": "Basic LLM Chain (@trans)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        4096,
        896
      ]
    },
    {
      "id": "adeaa1b3-fbcb-4a11-a1cc-84dc75602478",
      "name": "Basic LLM Chain (reaction)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        4096,
        1056
      ]
    },
    {
      "id": "c443fefb-b54e-4b7a-b97f-60f115daa471",
      "name": "Format Slack Message (/trans)",
      "type": "n8n-nodes-base.code",
      "position": [
        4400,
        736
      ]
    },
    {
      "id": "c939414e-b72e-4a70-a60c-809294ba8d58",
      "name": "Format Slack Message (@trans)",
      "type": "n8n-nodes-base.code",
      "position": [
        4400,
        896
      ]
    },
    {
      "id": "05b95459-5234-479d-8455-74504d4fbfa6",
      "name": "Format Slack Message (reaction)",
      "type": "n8n-nodes-base.code",
      "position": [
        4400,
        1056
      ]
    },
    {
      "id": "3a592c03-37b3-4d68-a22c-1b7bff70c5f1",
      "name": "Post to Slack (response_url)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4576,
        736
      ]
    },
    {
      "id": "07a8ba81-4fee-4073-b8fa-48de1e829bc9",
      "name": "Post to Slack (@trans reply)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4576,
        896
      ]
    },
    {
      "id": "4a426e04-11a0-4e99-b37a-0aa2580ea043",
      "name": "Post to Slack (reaction reply)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4576,
        1056
      ]
    },
    {
      "id": "a83c3091-3bac-4fe9-ba77-f15fd9051db3",
      "name": "How to set up",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2880,
        240
      ],
      "parameters": {
        "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"
      }
    },
    {
      "id": "c5f820f6-5027-49d4-89de-a1781aa354e9",
      "name": "Webhook (Slack @trans + reaction)",
      "type": "n8n-nodes-base.webhook",
      "position": [
        2944,
        976
      ]
    },
    {
      "id": "0a859374-d091-468f-bd68-ecb898b7a435",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4384,
        -16
      ],
      "parameters": {
        "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"
      }
    },
    {
      "id": "3e9045e2-e73b-4a23-a30a-9ecc27a16ed8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3824,
        240
      ],
      "parameters": {
        "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"
      }
    },
    {
      "id": "11a71607-a154-4a2a-8903-c896f4462551",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2880,
        1200
      ],
      "parameters": {
        "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 scop"
      }
    },
    {
      "id": "a6cce3e2-180b-45ee-ba6d-b81e1bcdb5b5",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4336,
        1328
      ],
      "parameters": {
        "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 “Tran"
      }
    },
    {
      "id": "88bac316-9994-466b-8f75-b7d2f8cf1467",
      "name": "Route by Event Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        3328,
        976
      ]
    },
    {
      "id": "1a9163a3-bcab-475d-8372-de95de586e4f",
      "name": "Skip Reaction When No Message Found",
      "type": "n8n-nodes-base.if",
      "position": [
        4112,
        1376
      ]
    },
    {
      "id": "1eb61e22-6993-4fd0-ac72-0f9b0fbb976d",
      "name": "Filter Reaction Type",
      "type": "n8n-nodes-base.code",
      "position": [
        3584,
        1376
      ]
    },
    {
      "id": "e3aa1071-f785-4338-a8f4-ae20384ae621",
      "name": "Detect Slack Event Type",
      "type": "n8n-nodes-base.code",
      "position": [
        3136,
        976
      ]
    }
  ],
  "connections": {
    "Parse Mention Event": {
      "main": [
        [
          {
            "node": "Basic LLM Chain (@trans)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Slash Payload": {
      "main": [
        [
          {
            "node": "Basic LLM Chain (/trans)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Event Type": {
      "main": [
        [
          {
            "node": "Ack Mention Event",
            "type": "main",
            "index": 0
          },
          {
            "node": "Parse Mention Event",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Ack Reaction Event",
            "type": "main",
            "index": 0
          },
          {
            "node": "Parse Reaction Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Reaction Type": {
      "main": [
        [
          {
            "node": "Fetch Original Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Reaction Event": {
      "main": [
        [
          {
            "node": "Filter Reaction Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Original Message": {
      "main": [
        [
          {
            "node": "Prep Reaction Translation Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook (Slack /trans)": {
      "main": [
        [
          {
            "node": "Ack (Respond to Slack)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Parse Slash Payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Detect Slack Event Type": {
      "main": [
        [
          {
            "node": "Route by Event Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain (/trans)": {
      "main": [
        [
          {
            "node": "Format Slack Message (/trans)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain (@trans)": {
      "main": [
        [
          {
            "node": "Format Slack Message (@trans)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain (reaction)",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Basic LLM Chain (@trans)",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Basic LLM Chain (/trans)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain (reaction)": {
      "main": [
        [
          {
            "node": "Format Slack Message (reaction)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Slack Message (/trans)": {
      "main": [
        [
          {
            "node": "Post to Slack (response_url)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Slack Message (@trans)": {
      "main": [
        [
          {
            "node": "Post to Slack (@trans reply)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Slack Message (reaction)": {
      "main": [
        [
          {
            "node": "Post to Slack (reaction reply)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prep Reaction Translation Input": {
      "main": [
        [
          {
            "node": "Skip Reaction When No Message Found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook (Slack @trans + reaction)": {
      "main": [
        [
          {
            "node": "Detect Slack Event Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Skip Reaction When No Message Found": {
      "main": [
        [
          {
            "node": "Basic LLM Chain (reaction)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}