How to mention user in slack using http node?

Hi,

I have made a slack bot to communicate to slack channel. I’m trying to mention user in the channel in a message using http node. Sending @username through http node returns it as just text. How can I mention user?

You can write <$username> it should then work correctly.

okay will try it out. Thanks

<$username> is not working.

Ah sorry, was a typo. I mean <@username>.

I tried that too, but it didn’t work either. I’m adding the code i wrote in http node below

{

“channel”:“U01GQFH6DUN”,

“blocks”:[

{

“type”:“divider”

},

{

“type”:“section”,

“text”:{

“type”:“plain_text”,

“text”:“Hi, Abhay has been assigned to you as your Buddy for this quarter. Click on the name to start a chat <@Abhay P A> We recommend you to set up a weekly cadence in the calendar for the next 3 months”,

“emoji”:true

}

}

]

}

Is that really the user-name? Because it works perfectly fine for me. Maybe the spaces are the problem. As an alternative you can also try to use the user-id or you can try setting link_names=1.

But is honestly the wrong forum for that question. Is less n8n related more Slack. So best to check in a Slack-Forum if nothing what I wrote above works.

Here the Slack documentation:

Thank you,
I was using http node for this so <@username> in attachment are taken as normal text only i think. But your reply give me the idea of trying this out with slack node and it works.

Thanks Again

Ah glad to hear that you got it working.

Have fun!

1 Like