cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amarkit
Level: Powered On

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
amarkit
Level: Powered On

Re: Post Slack Message to an Individual from Dynamic Content

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
amarkit
Level: Powered On

Re: Post Slack Message to an Individual from Dynamic Content

@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
Community Support Team
Community Support Team

Re: Post Slack Message to an Individual from Dynamic Content

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.
amarkit
Level: Powered On

Re: Post Slack Message to an Individual from Dynamic Content

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

chico
Level: Powered On

Re: Post Slack Message to an Individual from Dynamic Content

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

Highlighted
amarkit
Level: Powered On

Re: Post Slack Message to an Individual from Dynamic Content

@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
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (5,340)