Stop unfurling of links in messages posted to Slack

I have a use case where I’m taking a list of Jira issues and formatting a message to be sent to Slack containing links to the Jira issues formatted as a link that Slack will subsequently link with a title for the URL using its Markdown-esque syntax (e.g. “https://somesite.atlassian.net/browse/PROJECT-1000|PROJECT-1000”).

Slack “unfurls” these links, which essentially means showing preview content that is generated from the link under the message content containing the link(s).

I’d like to avoid that behaviour and Slack’s messaging API provides the ability to prevent unfurling in calls to the Slack API (see https://api.slack.com/reference/messaging/link-unfurling for details). Is there a way to do this in Coda currently? Slack does provide the ability to disable unfurling for specific domains, which would solve this problem to an extent, but I’d prefer to unfurl the links in other instances, so my preference would be to do this through Coda instead.

Has anyone been in a similar situation and found a solution to this?

1 Like

Hey @Allan_Jones,

Looks like wrapping the formatting block in the in-line code single ticks ` works to prevent unfurling!

Here’s an example:

`<https://jira.atlassian.com/browse/SRCTREE-889|SRCTREE-889>`

# Renders the link as below without the unfurling! 
# Just have to deal with the orange color instead of a link color.
SRCTREE-889

image

Thanks for posing the question! Going to make use of this in my docs now.

2 Likes

Better late than never, but I just wanted to share that we just updated the PostMessage button with a noUnfurl option you can use to stop unfurling of links and media in the message.

image

1 Like

Hi Oleg,

Thanks for this. How would noUnfurl this work in PostMessage content?

I have this currently in the content field:

Format(“{1}
Please see {2}”,
thisRow.Name, thisRow.ObjectLink())

Thanks for any help or guidance,
Nat

You simply need to set the noUnfurl paramter in PostMessage.

PostMessage([User's private Slack account], "Message", "Channel", noUnfurl: true())