Intermediate~15 min setupAI & CommunicationVerified April 2026
OpenAI logo
Slack logo

How to Translate Slack Messages with Pipedream

React with flag emojis to translate Slack messages into different languages using OpenAI.

Steps and UI details are based on platform versions at time of writing โ€” check each platform for the latest interface.

Best for

Global teams who need instant message translation without switching apps.

Not ideal for

Teams that translate entire threads or need translation history stored.

Sync type

real-time

Use case type

notification

Real-World Example

๐Ÿ’ก

A 25-person remote team with members in Japan, Germany, and Brazil uses this to translate important messages in #general. Instead of copying text to Google Translate, they just react with ๐Ÿ‡บ๐Ÿ‡ธ or ๐Ÿ‡ฏ๐Ÿ‡ต and get the translation posted as a thread reply within 3 seconds.

What Will This Cost?

Drag the slider to your expected monthly volume.

/mo
505005K50K

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

Skip the setup

Import this workflow directly into Pipedream

Copy the pre-built Pipedream blueprint and paste it straight into Pipedream. 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.

Slack workspace admin access to install apps and invite bots to channels
OpenAI API key with available credits (get from platform.openai.com/api-keys)
Pipedream bot invited to channels where translation will be used

Optional

Team members know which flag emojis map to which languages

Field Mapping

Map these fields between your apps.

FieldAPI Name
Required
Reaction Emojisteps.trigger.event.reaction
Original Message Textsteps.trigger.event.item.message.text
Target Languagesteps.map_flag_to_language.language
Channel IDsteps.trigger.event.item.channel
Thread Timestampsteps.trigger.event.item.ts
1 optional fieldโ–ธ show
User IDsteps.trigger.event.user

Step-by-Step Setup

1

Pipedream > New > Build a workflow

Create new workflow

Navigate to pipedream.com and click the green 'New' button in the top right. Select 'Build a workflow' from the dropdown menu. You'll land on the workflow builder with a trigger step already created. Click on the trigger step to configure it.

  1. 1Click 'New' in the top right corner
  2. 2Select 'Build a workflow' from the dropdown
  3. 3Click on the default trigger step
  4. 4Search for 'Slack' in the app selector
โœ“ What you should see: You should see the Slack trigger configuration panel open with a list of available events.
โš 
Common mistake โ€” Don't select 'New Message' trigger - you need the reaction-specific trigger for this workflow.
2

Trigger > Slack > New Reaction Added

Configure reaction trigger

Select 'New Reaction Added' from the Slack trigger list. This event fires whenever someone adds an emoji reaction to any message in your Slack workspace. You'll need to connect your Slack account by clicking 'Connect Account' and going through Slack's OAuth flow.

  1. 1Select 'New Reaction Added' from the event list
  2. 2Click 'Connect Account' button
  3. 3Authorize Pipedream in the Slack popup
  4. 4Select your Slack workspace from the dropdown
โœ“ What you should see: You should see 'Connected' status and your workspace name displayed in the trigger configuration.
โš 
Common mistake โ€” The bot needs to be in channels where translation will happen - invite @Pipedream to relevant channels.
Pipedream
+
click +
search apps
OpenAI
OP
OpenAI
Configure reaction trigger
OpenAI
OP
module added
3

Trigger > Generate Test Event

Test the trigger

Click 'Generate Test Event' to create sample data for your workflow. If no test data appears, go to any Slack channel and add a flag emoji reaction to a message. Return to Pipedream and click 'Generate Test Event' again. The test data shows the structure of reaction events.

  1. 1Click 'Generate Test Event' button
  2. 2If empty, go react to a Slack message with any emoji
  3. 3Return to Pipedream and click 'Generate Test Event' again
  4. 4Verify the test data includes reaction and message details
โœ“ What you should see: You should see JSON data with 'reaction', 'user', 'item' fields and the original message text.
Pipedream
โ–ถ Deploy & test
executed
โœ“
OpenAI
โœ“
Slack
Slack
๐Ÿ”” notification
received
4

Add Step > Filter

Add filter step

Click the + button below the trigger to add a new step. Select 'Filter' from the step types. This filters reactions to only flag emojis that represent languages. Configure the filter to check if the reaction emoji matches flag patterns like 'flag-us', 'flag-jp', 'flag-de'.

  1. 1Click the + button below the trigger step
  2. 2Select 'Filter' from the step types
  3. 3Set condition to 'Reaction contains flag-'
  4. 4Add the expression: {{steps.trigger.event.reaction}}.includes('flag-')
โœ“ What you should see: The filter step shows green with your condition and will only allow flag emoji reactions to proceed.
โš 
Common mistake โ€” Country flag emojis in Slack use 'flag-xx' format, not the actual emoji characters.
OpenAI
OP
trigger
filter
Condition
matches criteria?
yes โ€” passes through
no โ€” skipped
Slack
SL
notified
5

Add Step > Code > Node.js

Add emoji mapping step

Add a 'Node.js Code' step to map flag emojis to language codes. This step converts Slack's flag emoji names like 'flag-us' or 'flag-jp' into language codes that OpenAI understands like 'English' or 'Japanese'. The mapping ensures accurate translation requests.

  1. 1Click + to add another step
  2. 2Select 'Node.js Code' from the options
  3. 3Name the step 'Map Flag to Language'
  4. 4Paste the language mapping code in the code editor
โœ“ What you should see: The code step should compile successfully and show the mapped language in the test output.
โš 
Common mistake โ€” Some flag emojis don't have direct language mappings - include a fallback to English for unsupported flags.
OpenAI fields
choices[0].message.content
model
usage.prompt_tokens
usage.completion_tokens
finish_reason
available as variables:
1.props.choices[0].message.content
1.props.model
1.props.usage.prompt_tokens
1.props.usage.completion_tokens
1.props.finish_reason
6

Add Step > OpenAI > Chat

Add OpenAI step

Click + to add an OpenAI step. Select 'Chat' action to use GPT for translation. Connect your OpenAI account using your API key from platform.openai.com. Configure the system message to instruct GPT to translate text and the user message to include the original Slack message text.

  1. 1Click + to add a new step
  2. 2Search for and select 'OpenAI'
  3. 3Choose the 'Chat' action
  4. 4Connect your OpenAI account with API key
  5. 5Set model to 'gpt-3.5-turbo' for cost efficiency
โœ“ What you should see: OpenAI step shows 'Connected' status and model selection dropdown populated with available models.
โš 
Common mistake โ€” GPT-4 costs 10x more than GPT-3.5-turbo - use 3.5-turbo unless you need higher accuracy.
7

OpenAI Step > Messages Configuration

Configure translation prompt

In the OpenAI step, set up the system and user messages. The system message should instruct GPT to translate text accurately while preserving formatting. The user message combines the target language from step 5 with the original message text from the trigger. Include context about keeping @mentions and #channels unchanged.

  1. 1Set System Message: 'Translate the following text accurately. Preserve @mentions and #channels.'
  2. 2Set User Message: 'Translate to {{steps.map_flag_to_language.language}}: {{steps.trigger.event.item.message.text}}'
  3. 3Set temperature to 0.1 for consistent translations
  4. 4Set max tokens to 500
โœ“ What you should see: The OpenAI configuration shows your prompt template with dynamic values from previous steps.
8

Add Step > Slack > Send Message to Channel

Add Slack reply step

Add another Slack step to post the translation as a thread reply. Select 'Send Message to Channel' action. Configure it to reply in thread by setting the thread timestamp to the original message's timestamp. This keeps translations organized under the original message.

  1. 1Click + to add a Slack step
  2. 2Select 'Send Message to Channel'
  3. 3Set channel to {{steps.trigger.event.item.channel}}
  4. 4Set thread_ts to {{steps.trigger.event.item.ts}}
  5. 5Set text to include the translation and source language
โœ“ What you should see: Slack step configured to post threaded replies with translation text in the same channel.
โš 
Common mistake โ€” Without thread_ts, translations post as new messages instead of replies, cluttering the channel.
9

Deploy > Test in Slack

Test the complete workflow

Click 'Deploy' to activate your workflow. Go to a Slack channel where the Pipedream bot has access and post a test message. React to that message with a flag emoji like ๐Ÿ‡ซ๐Ÿ‡ท or ๐Ÿ‡ช๐Ÿ‡ธ. The workflow should trigger within 2-3 seconds and post a translation as a thread reply.

  1. 1Click the green 'Deploy' button in the top right
  2. 2Go to a Slack channel with the bot invited
  3. 3Post a test message in English
  4. 4React with a flag emoji like ๐Ÿ‡ซ๐Ÿ‡ท
  5. 5Check for the threaded translation reply
โœ“ What you should see: You should see a thread reply with the translated text within 3 seconds of adding the flag reaction.
โš 
Common mistake โ€” If the translation doesn't appear, check the workflow execution logs for API errors or permission issues.

This Node.js code maps Slack flag emoji names to full language names for better OpenAI translation accuracy. Paste it in the emoji mapping step between the filter and OpenAI steps.

JavaScript โ€” Code Stepexport default defineComponent({
โ–ธ Show code
export default defineComponent({
  async run({ steps, $ }) {
    const flagToLanguage = {

... expand to see full code

export default defineComponent({
  async run({ steps, $ }) {
    const flagToLanguage = {
      'flag-us': 'English',
      'flag-gb': 'English',
      'flag-es': 'Spanish',
      'flag-fr': 'French',
      'flag-de': 'German',
      'flag-jp': 'Japanese',
      'flag-cn': 'Chinese',
      'flag-kr': 'Korean',
      'flag-it': 'Italian',
      'flag-pt': 'Portuguese',
      'flag-ru': 'Russian',
      'flag-nl': 'Dutch',
      'flag-ar': 'Arabic',
      'flag-in': 'Hindi',
      'flag-br': 'Portuguese'
    };
    
    const reaction = steps.trigger.event.reaction;
    const targetLanguage = flagToLanguage[reaction] || 'English';
    
    // Add context for better translations
    const isBusinessContext = steps.trigger.event.item.message.text.includes(
      'meeting', 'project', 'deadline', 'report', 'budget'
    );
    
    return {
      language: targetLanguage,
      context: isBusinessContext ? 'business' : 'casual',
      original_emoji: reaction
    };
  }
});

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

VerdictWhy n8n for this workflow

Use Pipedream for this if your team needs instant translation without context switching and you're comfortable with some Node.js customization. The webhook triggers fire within 2 seconds of flag reactions, and the code steps let you build sophisticated emoji-to-language mapping that other platforms struggle with. Zapier's formatter can't handle the flag emoji logic cleanly, and you'd need multiple zaps.

Cost

At 50 translations per month, you'll spend about $0.10 in OpenAI credits plus Pipedream's free tier covers the workflow executions. At 500 translations monthly, that's $1 in OpenAI costs and you'll still stay within Pipedream's free limits. Make.com would cost $9/month minimum for the same volume, making Pipedream 9x cheaper for translation workflows.

Tradeoffs

Zapier handles Slack reactions better with dedicated triggers, but lacks the code flexibility for complex emoji mapping. Make.com has stronger conditional logic tools for filtering flag types without custom code. n8n gives you similar Node.js power but requires self-hosting and more setup overhead. Power Automate's Slack integration is limited and doesn't handle reaction events reliably. Pipedream wins on the combination of instant webhooks, free tier generosity, and code flexibility.

You'll hit OpenAI rate limits if your team goes translation-crazy during big announcements - add retry logic and user feedback when the API is overwhelmed. Slack's emoji naming isn't always obvious: some country flags use different codes than you'd expect. Long messages can hit OpenAI's context limits and get truncated, so test with your typical message lengths and adjust max_tokens accordingly.

Ideas for what to build next

  • โ†’
    Add reverse translation โ€” Let users react to translations with original language flag to translate back. Prevents confusion in multi-language threads.
  • โ†’
    Store translation history โ€” Log translations to Google Sheets or Airtable for usage analytics and cost tracking per language or user.
  • โ†’
    Expand to file translation โ€” Detect when flag reactions are added to file uploads and translate document titles or descriptions using OCR integration.

Related guides

Was this guide helpful?
โ† OpenAI + Slack overviewPipedream profile โ†’