cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
amarkit
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
amarkit
Frequent Visitor

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

amarkit
Frequent Visitor

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

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
Frequent Visitor

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 Advocate II
Advocate II

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?

amarkit
Frequent Visitor

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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
Users online (7,414)