cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Post Slack Message to an Individual from Dynamic Content

I'm trying to send a Slack message to an individual user, with that person's username as a piece of dynamic content. If I just type a username in the Slack channel name (@user), it works fine, but I'm trying to direct the message to a user based on a lookup of the username in a Sharepoint list. When I try to use the dynamic content from the lookup earlier in the Flow, the Slack message send step throws an error, as it thinks the channel name is @{body('Get_item')['HostID']}. I've tried writing the HostID as a string variable and passing the string into the Slack step, but it returns the same error, thinking the channel name is @{variables('hostID')}. I tried putting the dynamic username into a tolower() function, that also didn't help.

 

Any thoughts on a workaround here? I found this discussion from 2016, but it seems like any kind of dynamic content is rejected by Slack.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted

Thanks for your help @v-yamao-msft. I was able to do what I need to do by pushing the messages directly into Slack from PowerApps, rather than going through Flow as an intermediate step.

View solution in original post

Highlighted
Frequent Visitor

@chico: Make sure you have the Slack connection installed. Then you can use the Slack.PostMessage command in PowerApps:

 

Slack.PostMessage("#channelname", "MessageText", {username:"Bot", parse:"full"})

 

The details of the connector are here

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

Hi @amarkit ,

 

Thanks for feedback. The issue could be reproduced by me.

 

I am afraid that @ mention has not been supported currently by Flow.

 

Please feel free submit your request on Flow Ideas Forum at here:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

Thanks for your help @v-yamao-msft. I was able to do what I need to do by pushing the messages directly into Slack from PowerApps, rather than going through Flow as an intermediate step.

View solution in original post

Highlighted

got any reference or pointers on how/what you did in powerapps to send to slack?

Highlighted
Frequent Visitor

@chico: Make sure you have the Slack connection installed. Then you can use the Slack.PostMessage command in PowerApps:

 

Slack.PostMessage("#channelname", "MessageText", {username:"Bot", parse:"full"})

 

The details of the connector are here

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (8,058)