Hyperlinks best practices (Slack)
Hey guys, is still an issue ?
https://github.com/novuhq/novu/pull/4834
Is there a way to add hyperlinks that I should know of (in general, and in Slack), we are considering using novu, but not being able to add hyperlinks to notifications is something we are not willing to sacrifice.
GitHub
NV-3548 - 🐛 Bug Report: Can't embed hyperlink in Slack message by g...
What change does this PR introduce?
Allows users to embed links in the message.
Why was this change needed?
Closes: #3548
Other information
Loom Video
This code was written and reviewed by GitStar...
9 Replies
Hi @Norrude, I'm an AI assistant for Novu. While a team member reviews this question, I'll look through relevant sources and see if I can provide suggestions. Please tag @Ask Inkeep with any follow-up questions.
-----------------------------
While I generate an answer, here are some sources that might be helpful:
* Update subscriber credentials
* How to send push notifications in an Android app (react native) with FCM and Novu
* Windows
* Workflow Editor
-----------------------------
Answer
Regarding the GitHub issue you mentioned (https://github.com/novuhq/novu/pull/4834), I can't provide specific insights because the provided information sources do not cover it directly.
However, for adding hyperlinks in notifications, Novu supports dynamic data in the notification payload, which means you can include hyperlinks as part of the dynamic content. When crafting a notification, you can use variables within the notification template to include hyperlinks. Here's a code snippet illustrating how to include a hyperlink in a dynamic notification:
(1)
For Slack specifically, Novu allows using webhook URLs to send notifications, which means you can format your messages with Slack's message formatting syntax to include links. You might need to set up your notifications to send in a format that Slack understands (including hyperlinks using
<URL|text>
syntax) within the payload you send to Novu for triggering the notification (2) .
Please verify these capabilities with the most current Novu documentation or the community, as product features can evolve.This leads to it being displayed as plain text
I think I have tried it all,
<url|title>
: either is removed from workflow message or if written like so: <url|title>
is treated as plain text.
[title](url)
: is treated by slack as plain text, as slack doesn't use markdown
<a href="url">title</a>
: same for html
Am I missing something or has this problem existed for more than a year and nobody has done anything about it ?@Norrude
Could you please use triple curly braces variable
{{{resetLink}}}
and then send resetLink
value as <url|title>
Ok it does work, thank you Pawan
I will add this in doc
hey @Pawan Jain ,
I just want to share some feedback on the current flow, we might want to contribute to improve it, although there already is a PR open with the fix.
In the picture I'm sharing, I need to have slack specific variables because I am unable to build the url from generic variables (ex:
<https://myapp.com/{{id}}|{{name}}>
would be ideal.@Norrude, you just advanced to level 1!
@Norrude
Are you looking to have this supported natively in our chat step editor?
<https://myapp.com/{{id}}|{{name}}>