Multilingual Slack Translation Assistant using Gemini 2.5 Flash - n8n Workflow

Automate Japanese ⇄ English translation in Slack using a powerful n8n workflow integrated with Google Gemini 2.5 Flash. Supports slash commands, mentions, and reactions.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Technical teams operating in bilingual environments (Japanese and English).
n8n automation specialists looking for advanced Slack integration examples.
Users who need reliable, AI-driven translation directly within their communication platform.
Developers seeking ready-made n8n templates for LLM-based applications.

Overview

Global teams often struggle with communication latency caused by language barriers. This sophisticated n8n workflow solves this by providing three distinct, instantaneous methods for translating messages between Japanese (JA) and English (EN) directly within Slack. Powered by the high-speed Google Gemini 2.5 Flash model, this comprehensive n8n template ensures that cross-lingual collaboration is seamless.

Whether you need a formal announcement using a slash command, a quick thread translation via an app mention, or an on-demand translation using an emoji reaction, this single n8n workflow streamlines the process, keeping your conversations flowing. Every path leverages the same core AI logic, making this an extremely robust and efficient n8n automation solution.

How it Works

This robust n8n workflow begins with one of two distinct n8n trigger points. The first is the Webhook (Slack /trans) n8n node, activated by the Slack /trans slash command. The second is the Webhook (Slack @trans + reaction) n8n trigger, which listens for both @appmention events and reactionadded events.

Slash Command Path (/trans)


  1. The workflow immediately uses the Ack (Respond to Slack) n8n node to send an instant "Translating..." confirmation.

  2. The Parse Slash Payload n8n node extracts the text and the unique responseurl.

  3. The request is routed to a Basic LLM Chain n8n node, which interfaces with the shared Google Gemini Chat Model node for automatic language detection and translation.

  4. A custom Code n8n node (Format Slack Message (/trans)) formats the output neatly (Original + Translation).

  5. The Post to Slack (responseurl) n8n node publishes the result publicly to the channel.

App Mention Path (@trans)


  1. The initial n8n trigger acknowledges the event using the Ack Mention Event node.

  2. The Parse Mention Event n8n node strips the bot mention from the text and identifies the thread TS.

  3. The cleaned text is passed to its own Basic LLM Chain node, generating the translation.

  4. The translation-only result is formatted by Format Slack Message (@trans) and posted as a reply within the original thread using the Post to Slack (@trans reply) n8n node.

Reaction Path (e.g., :jp: or :us:)


  1. The initial n8n trigger acknowledges the event (Ack Reaction Event).

  2. The Parse Reaction Event n8n node extracts the channel and message timestamp (TS).

  3. A filter ensures only relevant language reactions (like jp or us) proceed.

  4. The Fetch Original Message n8n node retrieves the original message text using the Slack API.

  5. The text is translated via a dedicated Basic LLM Chain n8n node and finally posted as a thread reply using the Post to Slack (reaction reply) n8n node, offering translation on demand. This comprehensive n8n workflow design ensures high reliability across all interaction methods.

Installation Guide

To utilize this powerful n8n workflow, follow these essential setup steps:


  1. Import the n8n workflow: Copy the provided JSON data and paste it into your n8n instance using the "New" -> "Import from JSON" option.

  2. Slack App Setup: You must create a Slack App (e.g., "TransBot"). Follow the instructions in the setup sticky notes within the n8n template itself to configure OAuth Scopes, Event Subscriptions, and the Slash Command.

  3. Webhook Configuration: Ensure your Slack App configuration points to your public n8n domain's webhook paths:

Slash Command URL: https:///webhook/slack/trans
Event Subscription URL: https:///webhook/slack/mention

  1. Credential Setup (Google Gemini): Set up a new Google Gemini credential in n8n (using an API key) and link it to the Google Gemini Chat Model n8n node.

  2. Credential Setup (Slack API): Replace YOURTOKENHERE in the Authorization: Bearer YOURTOKENHERE header parameter within the three HTTP Request n8n node steps (Fetch Original Message, Post to Slack (@trans reply), and Post to Slack (reaction reply)) with your Slack Bot User OAuth Token (xoxb-...).

  3. Activate: After configuring the credentials and URLs, activate the n8n workflow. Test all three modes to confirm the successful integration of this complex n8n template.

Node Details

Webhook (Slack /trans): The primary n8n trigger for the slash command, initiating the public translation path.
Webhook (Slack @trans + reaction): The second n8n trigger listening for Slack events (appmention, reactionadded). Key Configuration: Uses the path /slack/mention.
Google Gemini Chat Model: The central AI n8n node. Function: Executes the actual JA ⇄ EN translation using the powerful Gemini 2.5 Flash model. Key Configuration: Temperature: 0.2, Max Output Tokens: 1024.
Basic LLM Chain (x3): Function: Structures the prompt for Gemini, ensuring the output includes the mandated [Original] and [Translation] labels, facilitating accurate parsing by subsequent n8n node steps.
Fetch Original Message: An HTTP Request n8n node crucial for the reaction path. Function: Calls the Slack API (conversations.replies) to retrieve the text content of the message that received the reaction. Requires the Slack Bot Token.
Parse Slash Payload & Parse Mention Event: Code n8n nodes responsible for extracting the necessary text, identifiers, and responseurl from the respective Slack payloads.
Format Slack Message (x3): Custom Code n8n nodes that parse the LLM's structured output and format the message appropriately before posting back to Slack. This is customized for each interaction type in this n8n workflow.
Post to Slack (x3): A set of HTTP Request n8n nodes used to deliver the final translated message back to Slack, utilizing either the temporary response
url or the chat.postMessage API.

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by

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.

Featured*