

How to Auto-Translate Slack Messages with N8n and OpenAI
Automatically translate Slack messages to different languages when users react with flag emojis using N8n and OpenAI's API.
Steps and UI details are based on platform versions at time of writing β check each platform for the latest interface.
Best for
Teams that want instant message translation with custom language handling and don't mind writing basic JavaScript for emoji mapping.
Not ideal for
Non-technical teams who prefer plug-and-play solutions without any custom code or function nodes.
Sync type
real-timeUse case type
notificationReal-World Example
A 25-person software startup with team members in 6 countries uses this to break down language barriers in their #general channel. Before automation, non-English speakers would post in their native language and wait hours for someone to translate, slowing down urgent discussions. Now anyone reacts with a flag emoji and gets instant translation as a thread reply, keeping conversations moving at startup speed.
What Will This Cost?
Drag the slider to your expected monthly volume.
Each platform counts differently β Zapier: 1 task per trigger. Make: 1 operation per module per record. n8n: 1 execution per run.





Prices shown for annual billing. Based on published pricing as of April 2026.
Estimated ROI
1000
min saved/mo
$583
labor value/mo
Free
no platform cost
Based on ~2 min manual effort per operation at $35/hr fully loaded labor cost.
Implementation
Import this workflow directly into n8n
Copy the pre-built n8n blueprint and paste it straight into n8n. All modules, filters, and field mappings are already configured β you just need to connect your accounts.
Before You Start
Make sure you have everything ready.
Field Mapping
Map these fields between your apps.
| Field | API Name | |
|---|---|---|
| Required | ||
| Original Message Text | item.message.text | |
| Reaction Emoji | reaction | |
| Channel ID | item.channel | |
| Message Timestamp | item.ts | |
| Target Language | language | |
| Translation Result | choices[0].message.content | |
Step-by-Step Setup
Workflows > New > Add Node > Slack Trigger
Create New N8n Workflow
Start a new workflow in N8n and add the Slack trigger node. This will listen for emoji reactions on messages in your workspace.
- 1Click 'New workflow' in the N8n dashboard
- 2Click the '+' button to add your first node
- 3Search for 'Slack' and select 'Slack Trigger'
- 4Choose 'Reaction Added' from the events dropdown
Node Settings > Credentials > Create New
Connect Slack Account
Link your Slack workspace to N8n using OAuth. You'll need admin permissions to install the N8n app in your workspace.
- 1Click 'Create New' next to Credentials
- 2Select 'Slack OAuth2 API' from the dropdown
- 3Click 'Connect my account' and authorize in the popup
- 4Select your workspace and click 'Allow'
Slack Node > Additional Fields > Filters
Configure Reaction Trigger
Set up the trigger to fire only on flag emoji reactions. This prevents the workflow from running on every reaction in your workspace.
- 1In the Slack node, click 'Add Filter' under Additional Fields
- 2Set Filter Key to 'reaction'
- 3Set Filter Value to 'flag-*' to match any flag emoji
- 4Enable 'Use Regex' checkbox for the wildcard pattern
Add Node > Function > Code Editor
Add Function Node for Language Detection
Create a function node to map flag emojis to language codes. This converts reactions like :flag-fr: into 'French' for OpenAI's API.
- 1Click '+' to add a new node after Slack
- 2Search for 'Function' and select it
- 3Paste the flag-to-language mapping code in the code editor
- 4Set the output to include both language name and original message text
Add Node > OpenAI > Chat
Connect OpenAI Translation Node
Add OpenAI node to handle the actual translation. Configure it to use GPT-3.5-turbo for cost efficiency since translation doesn't need GPT-4.
- 1Add a new node and select 'OpenAI'
- 2Choose 'Chat' as the resource type
- 3Create new OpenAI credentials with your API key
- 4Set Model to 'gpt-3.5-turbo' in the options
OpenAI Node > Messages
Configure Translation Prompt
Set up the chat prompt to translate messages accurately. Include context about preserving formatting and handling technical terms appropriately.
- 1In the OpenAI node, set System Message to 'You are a translator. Translate the following message accurately, preserving any formatting or technical terms.'
- 2Set User Message to reference the function output: 'Translate this to {{$node["Function"].json["language"]}}: {{$node["Function"].json["message"]}}'
- 3Set Max Tokens to 500 to handle longer messages
- 4Set Temperature to 0.1 for consistent translations
Add Node > Slack > Message > Post
Add Slack Reply Node
Configure a Slack node to post the translation as a thread reply. This keeps translations organized under the original message.
- 1Add another Slack node after OpenAI
- 2Set Resource to 'Message' and Operation to 'Post'
- 3Use the same Slack credentials from step 2
- 4Set Channel to reference the original channel: {{$node["Slack Trigger"].json["item"]["channel"]}}
Slack Message Node > Text and Thread Settings
Configure Thread Reply
Set the message to post as a threaded reply with the translation. Include the target language for clarity.
- 1Set Text field to: 'Translation ({{$node["Function"].json["language"]}}): {{$node["OpenAI"].json["choices"][0]["message"]["content"]}}'
- 2Set Thread TS to: {{$node["Slack Trigger"].json["item"]["ts"]}}
- 3Enable 'As User' to false so it posts as the N8n bot
- 4Test the workflow with Execute Workflow button
OpenAI Node > Settings > Error Handling
Add Error Handling
Configure error handling for API failures and unsupported languages. This prevents the workflow from breaking on edge cases.
- 1Click Settings on the OpenAI node
- 2Under 'On Error', select 'Continue With Default Value'
- 3Set Default Value to 'Translation unavailable'
- 4Enable 'Always Output Data' checkbox
Workflow > Activate > Test in Slack
Test with Real Reactions
Activate the workflow and test it with actual flag emoji reactions in Slack. Verify translations appear as threaded replies.
- 1Click 'Save' then 'Activate' in the top right
- 2Go to any Slack channel where the N8n app is installed
- 3Post a test message and react with a flag emoji like :flag-es:
- 4Check that the translation appears as a thread reply within 30 seconds
Drop this into an n8n Code node.
JavaScript β Code Nodeconst flagToLanguage = {βΈ Show code
const flagToLanguage = {
'flag-es': 'Spanish',
'flag-fr': 'French', ... expand to see full code
const flagToLanguage = {
'flag-es': 'Spanish',
'flag-fr': 'French',
'flag-de': 'German',
'flag-it': 'Italian',
'flag-pt': 'Portuguese',
'flag-jp': 'Japanese',
'flag-kr': 'Korean',
'flag-cn': 'Chinese',
'flag-ru': 'Russian'
};
const reaction = $input.item.json.reaction.replace(/:/g, '');
const language = flagToLanguage[reaction] || 'English';
const message = $input.item.json.item.message.text;
return { language, message, original_reaction: reaction };Scaling Beyond 50+ translations per day+ Records
If your volume exceeds 50+ translations per day records, apply these adjustments.
Cache Common Translations
Add a Google Sheets node to cache frequently translated phrases. Check the cache first before calling OpenAI to reduce API costs and speed up responses for repeated content.
Batch Similar Requests
Use N8n's SplitInBatches node to group multiple translation requests into single OpenAI calls. The API handles multiple translations in one request more efficiently than individual calls.
Monitor OpenAI Costs
Add a function node to log token usage after each translation. Set up alerts when daily costs exceed your budget threshold to avoid surprise bills during high-usage periods.
Going live
Production Checklist
Before you turn this on for real, confirm each item.
Troubleshooting
Common errors and how to fix them.
Frequently Asked Questions
Common questions about this workflow.
Analysis
Use N8n for this if you want full control over the translation logic and don't mind writing some JavaScript. N8n's function nodes let you build custom flag-to-language mapping that handles edge cases Zapier's pre-built apps miss. The webhook triggers fire instantly when someone reacts, unlike polling-based tools. Skip N8n if your team has zero coding comfort β Zapier's drag-and-drop interface handles basic flag translation without any custom code.
This workflow burns about 3 executions per translation: trigger, function processing, and OpenAI call. At 100 translations per month, that's 300 executions total. N8n's Starter plan covers 5,000 executions for $20/month, so you're well within limits. Add $2-3 in OpenAI costs using gpt-3.5-turbo. Zapier would cost $30/month for the same volume since their Slack reactions require a Professional plan. Make comes out cheaper at $15/month but caps you at 10,000 operations.
Zapier wins on setup speed β their Slack reaction trigger connects in 2 clicks without custom code for language detection. Make's visual debugger shows exactly which emoji triggered each run, making troubleshooting easier than N8n's execution logs. But N8n beats both on customization depth. You can add custom translation rules, handle business-specific terminology, or route certain languages to human translators instead of AI.
OpenAI's chat completions work differently than their legacy text completions β the response structure changed from 'choices[0].text' to 'choices[0].message.content' in early 2023. Old tutorials reference the wrong path and break silently. Slack's emoji format varies by client: mobile apps send 'flag-us' while desktop sends ':flag-us:' with colons. Your function node needs to handle both formats or reactions from mobile users will fail. The Slack app permissions are sticky β if you change scopes later, you must reinstall the entire N8n app in your workspace.
Ideas for what to build next
- βAdd Translation Confidence Scoring β Enhance the OpenAI prompt to include confidence scores and flag uncertain translations for human review in a separate Slack channel.
- βCreate Translation Usage Dashboard β Send translation logs to Google Sheets or Airtable to track which languages are most requested and optimize your flag emoji mappings.
- βBuild Reverse Translation Flow β Add a second workflow that translates the translation back to English when someone reacts to the translated message, helping verify accuracy.
Related guides
How to Share Notion Meeting Notes to Slack with Pipedream
~15 min setup
How to Share Notion Meeting Notes to Slack with Power Automate
~15 min setup
How to Share Notion Meeting Notes to Slack with n8n
~20 min setup
How to Send Notion Meeting Notes to Slack with Zapier
~8 min setup
How to Share Notion Meeting Notes to Slack with Make
~12 min setup
How to Create Notion Tasks from Slack with Pipedream
~15 min setup