Translate Slack announcements into every regional channel

By General Input

Mirror every English announcement into your Spanish, Japanese, French, and German Slack channels, automatically and in the local language.

Integrations

  • Slack
  • JigsawStack

Type

Deterministic Code

Categories

  • Operations
  • HR & People

Build a code workflow that mirrors every announcement posted in our English source Slack channel into multiple regional Slack channels, with each regional post translated into that channel's local language.

Trigger: a Slack webhook event for a new message posted in the configured source channel (for example the #announcements channel). The workflow should run on every new top-level message and every threaded reply in that channel.

Configuration the workflow should expose:

- source_channel_id: the Slack channel id to watch.

- target_channels: an ordered list of objects, each with channel_id, language_code, and language_label. For example: #announcements-es / es / Spanish, #announcements-ja / ja / Japanese, #announcements-fr / fr / French, #announcements-de / de / German.

- skip_prefix: a string that, when a message text starts with it, causes the workflow to skip translation entirely. Default to "DNT:".

Steps:

1. From the Slack event payload, extract the message text, the author's Slack user id, the channel id, the message ts, the thread_ts (present when it is a threaded reply), and a flag indicating whether the sender is a bot (bot_id present or subtype is bot_message).

2. Skip the message if the sender is a bot, or if the message text starts with the configured skip_prefix. Also skip message_changed and message_deleted subtypes.

3. Fetch a permalink to the source message so the translated posts can link back to it.

4. For each entry in target_channels, run the following fan-out (in parallel where possible, with isolated error handling per entry):

a. Call the JigsawStack "Translate Text" operation with the original message text and the entry's language_code as the target language.

b. Compose the post body as the translated text followed by a small footer line in Slack mrkdwn that credits the original author and links back to the source message. Example footer: "_Posted by <@U123ABC> in <permalink|#announcements>_".

c. Call the Slack "Send a Message" operation to post into the entry's channel_id. If the source message has a thread_ts (it's a reply), the post must land in the matching thread in the target channel, not at the channel root. To do that, the workflow needs to remember a mapping from source thread_ts (the root message's ts in the source channel) to each target channel's root-message ts; when the source message is itself a top-level post, store the mapping so future replies can look it up; when it is a reply, look up the target thread root and post with thread_ts set to that value.

5. A failure to translate or post into one regional channel must not stop the other regional channels from receiving the announcement. Log per-channel failures with the channel id and a short reason.

Use the JigsawStack "Translate Text" operation and the Slack "Send a Message" operation. Treat the workflow as a deterministic fan-out: one inbound message in, N translations and N posts out, where N is the length of target_channels.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredA brand asset library your marketing team actually searchesChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teamsCatch feature flags that never got switched on in production