Formatting Links for Slack Pack

If you use the Slack Pack you may want to add links to your messages. Their syntax for allowing this isn’t intuitive.

For example, this does not work:

Slack::PostMessage([User's private Slack account],
  Format("Click here: {1}", Hyperlink("www.example.com", "link title"))
  "#random"
)

However, this does:

Slack::PostMessage([User's private Slack account],
  Format("Click here: <{1}|{2}>", "www.example.com", "link title")
  "#random"
)

The trick is to use that < url | title > syntax. E.g. <www.example.com|Example!> Read more here.

6 Likes

Thanks sharing your investigation on the formula language syntax @Connor_McCormick1 :trophy:

It’s unfortunately sometimes a question of testing to get it working and it would be great if sample like these are added to the Coda | Formula library.

@steph may I ask your assistance on this by communicating this to the engineers & customer relation responsible in relation to the Coda | Formula library?

2 Likes

Yep, I’m on it. Thanks for bringing this to my attention!

1 Like