Mentioning specific users in slack webhook

Hi there,

I have a slack webhook setup right now that, when triggered, it posts to a channel. My action is more or less set up as the following:

{
"text": "<<LOOKUP([_THISROW].[User], Users, Id, SlackName)>>: <<[Doc]>> is ready for you to view"
 }

What i would like to do is be able to tag the user in the channel so they get a specific mention/notification.

I’ve tried putting the “@” symbol right before the <<Lookup…>> but that doesn’t trigger the deeper integration for tagging a user, i’m assuming because this is all text. I’ve also tried putting the @ symbol in the username column in my User table, but that didn’t work either.

Any pointers on setting up so it tags the user would be helpful.

Thanks!
Cory

I don’t think you can insert mentions that way, but it might detect an email or URL and convert it to a clickable link.

For anything more than plan text, you have to send the message body as a ‘block’.

Simple text message body
"text": "message text..."

Block message body (mixed content, interactions, buttons, etc)

"text": "regular text message.",
    "blocks": [
    	{
    		"type": "section",
    		"text": {
    			"type": "mrkdwn",
    			"text": "markdown text"
    		}
    	},
    	{
    		"type": "section",
    		"block_id": "section567",
    		"text": {
    			"type": "mrkdwn",
    			"text": "*Markdown* message **text**"
    		},
    		"accessory": {
    			"type": "image",
    			"image_url": "https://imageurl.com/image123.jpg",
    			"alt_text": "test image"
    		}
    	},
    	{
    		"type": "section",
    		"block_id": "section789",
    		"fields": [
    			{
    				"type": "mrkdwn",
    				"text": "*test"
    			}
    		]
    	}
    ]
4 Likes

This is extremely helpful, thank you!

2 Likes