Best answer

How do I Transform/Format Slack Channel Names?

  • 14 December 2023
  • 4 replies
  • 68 views

Hi,

Is it possible to do the following? I’m using “Translate by Zapier” to automatically translate Russian messages sent on ru- channels to en-channels to achieve this:

User sends message to ru-documentation channel
Zapier detects that message was sent on ru-documentation channel
Zapier re-formats ru-documentation channel name to en-documentation
Zapier sends message to en-documentation channel

I’m having difficulty transforming the ru- channel into a en- channel.

 

Action: replace “ru-” with “en-” in channel name:

 

But then I’m unable to use that re-formatted channel name to post a message:

 

 

icon

Best answer by Troy Tessalone 14 December 2023, 22:13

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 7
Badge +14

Hi @hummus 

Good question.

Slack Channel fields expect the Slack Channel ID.

I understand. What’s the most efficient way to do an IFTTT for many different options?

If Channel ID = 111111, then replace for 123456
If Channel ID = 222222, then replace for 234567
If Channel ID = 333333, then replace for 345678
etc.

I think this could work with “Path by Zapier” but it seems quite inefficient.

Thanks for your help, Troy!

Userlevel 7
Badge +14

@hummus 

Use a lookup table.

 

This was very helpful, thanks, @Troy Tessalone!

I created a Lookup Table and it worked – but I dug deeper and ended up creating a Zapier Table as the relationship I wanted to create (between Slack Channel A and Slack Channel B) could be useful for other Zaps. A Zapier Table was also more “admin-friendly” in this case as it allowed me to add a 3rd column (“Destination Channel Name”) used only for reference when I manually (for now) inputted the Destination Channel IDs. 

 

The Zapier Table:

 

And the settings to associate a Destination Channel ID based on a Source Channel Name.