Slack is where most communication happens for a lot of companies, so why not have some fun styling your Slack messages sent from Coda!
How does text get styled in the first place?
When using Markdown to style text, you might type the following to make a word bold...
Look for the **bold** word.
In HTML, this would be written as...
<p>Look for the <b>bold</b> word.</p>
What Markdown does for us is automatically put the paragraph tags, <p></p>, at the start and end of every new line. Then it replaces any asterisk with the proper bold tag, <b></b>. This allows for much quicker typing when entering in content and all the hard work is handled behind the scenes.
What does this have to do with Coda and Slack?
Software aims to do as much for you as possible in order to be as efficient as possible. The more heavy lifting software can do, the more value it adds to the end user. But this also means that how something is rendered in Coda might not be rendered the same way in Slack. Each system might interpret various code symbols differently.
To get around this, Slack has decided to handle all text styling on its own, and Slack prefers Markdown. If we pass <b>bold</b> to Slack, it will display “bold” as plain text, but if we pass **bold** over to Slack, it will render it as styled text, “bold”. This goes for all of the other
website in Slack, we need to use the following pattern of <URL|Text> like this:
@mentions in messages from Coda to Slack can also be done. To do this, we need to grab the ID of the user in Slack and use that in the @reference instead of their Slack username. You can find a person’s ID in their profile info under the “More” menu option.
Now we can include the ID from the image above, UJDTYH2NL, as a Slack @mention, <@UJDTYH2NL>, to have the @mention show up in your message.
We can also mention @here, @channel, and @everyone by using <!here>, <!channel>, and <!everyone>.