Best answer

Posting a message to a new slack channel

  • 21 July 2022
  • 3 replies
  • 138 views

Hi there,

 

I have a Zap which creates a new slack channel with a name which is referenced from a previous step.

 

I then want to post a message to that channel, but of course at this point it is not available from the drop down list (not to mention that it’ll change every time, so I don't want to “hard select” it within the Zap). I’ve used the custom field to reference the same variable used to create the channel name, but it keeps returning an error and is unable to find the channel.

 

The flow is as follows:

 

> A new invoice is created in Xero

> Zap creates a new slack channel with the [invoice reference] as the channel name (this works perfectly)

> Zap posts a message to a slack channel called [invoice reference] using a custom field

> It returns the following error: Error from Slack: channel_not_found

 

Please note that I have tried this with an existing channel so I know that the issue is not with the channel being newly created. 

 

Is anyone out there able to help with this? Why can't I post a message to a Slack channel this way? Any suggestions on how to achieve the same result, if indeed this functionality isn't possible?

icon

Best answer by Danvers 16 August 2022, 14: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.

3 replies

Userlevel 7
Badge +14

Hi @laveryj_ 

Good question.

You’ll need to map the returned Slack Channel ID between Zap steps using the ‘Custom’ option: https://zapier.com/help/create/basics/set-up-your-zap-action#set-up-your-action

Userlevel 7
Badge +11

Hey @laveryj_!

Have you managed to get this working? It should definitely be possible, using the method that Troy mentioned.

Userlevel 7
Badge +12

You’ll need to map the returned Slack Channel ID between Zap steps using the ‘Custom’ option: https://zapier.com/help/create/basics/set-up-your-zap-action#set-up-your-action

Hi @laveryj_!

Expanding a little on Troy’s answer, when you use a Custom value in a Zap step, you need to use the ID of something, not the name. You can learn more about using Custom values in this help guide

 

In the case of your Zap, you’re likely seeing the error ‘channel_not_found’ because the Zap is expecting to see the ID of the new channel and not the name. If you select the channel ID from the previous step and not the name, you should be good to go!