⚙ Operations Hub

PHix
Participant

Send a Slack message to a Slack channel created in same workflow

SOLVE

We have a workflow that creates a private Slack channel when a deal reaches a certain stage of the pipeline. I would like to be able to send a standard welcome message to this channel after it is created. Because the current Slack channel creation workflow doesn't allow us to add anyone besides just the deal owner nor does it allow us to create a description, this will serve as a reminder of what the channel is for and who the deal owner should add.

 

I don't see a way of passing a token from the earlier channel creation step to the send message step. As the channel obviously doesn't exist yet, it can't be selected in the list. 

 

Does anyone know of a workaround for this? I've looked into the workflow engine within Slack itself and it appears to have the same limitation - I can't use channel creation as a trigger for sending a message.

1 Accepted solution
KimM
Solution
Top Contributor

Send a Slack message to a Slack channel created in same workflow

SOLVE

So if you create an app in Slack you should be able to do this in a few steps.

1. First create the channel in slack using the API using the conversations.create endpoint. Then in the API call response you would need to extract the channel ID as an output so you can use this in a second step.

2. Then in a second custom code step send the welcome message using the chat.postMessage endpoint and the channel ID you identified in the first step.

 

Hope this helps.

View solution in original post

2 Replies 2
KimM
Solution
Top Contributor

Send a Slack message to a Slack channel created in same workflow

SOLVE

So if you create an app in Slack you should be able to do this in a few steps.

1. First create the channel in slack using the API using the conversations.create endpoint. Then in the API call response you would need to extract the channel ID as an output so you can use this in a second step.

2. Then in a second custom code step send the welcome message using the chat.postMessage endpoint and the channel ID you identified in the first step.

 

Hope this helps.

DianaGomez
Community Manager
Community Manager

Send a Slack message to a Slack channel created in same workflow

SOLVE

Hi @PHix thank you for reaching out to the Community!

 

I wanted to tag in a couple of subject-matter experts to see if they have any input on this matter:
hi @SNigam@himanshurauthan@Bryantworks  do you have any advice for @PHix ?

 

Thank you!
Diana


¿Sabías que la Comunidad está disponible en Español?
¡Participa hoy en conversaciones en el idioma de tu preferencia,cambiando el idioma en tus configuraciones!

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !


0 Upvotes