• Home

  • Automation with Zapier

  • Zapier tutorials

Zapier tutorials

4 min read

How to format a Slack message in Zapier

By Justin Pot · March 6, 2023
A hero image featuring the logos for Slack and Zapier

A lot of people use Zapier to send information over to Slack, which makes sense: It's a great way to automatically share information with the team. But that information is only going to make sense if it's formatted cleanly. Here's how to format Slack messages in Zapier.

If you'd like, watch along as we format Slack messages:

To get started you're going to need to set up the app that will kick off your automated workflow (called a Zap). In this example, I'm going to pull in posts from the Zapier blog RSS feed using RSS by Zapier, but the advice outlined here should work for any of the thousands of apps supported by Zapier.

RSS by Zapier setup

Finish setting up this first step (called the trigger), filling in the info needed for whichever app you're using. Then use Slack for your action step.

Slack Channel Message step

You will be asked to sign into Slack, if you haven't already, and then you'll be asked to lay out your message.

Slack message in Zapier

I recommend setting up a #testing channel in Slack while you experiment with formatting, but you can do it live if you're brave. Here are the things you need to know.

Use fields to pull in information from your trigger step

Fields are what allow you to pull information from previous steps, like an RSS entry from my trigger step, into your Zap. To insert data from your RSS entry, click inside any empty field, and select the data you'd like to include from the Insert Data dropdown menu below.

Fields in Zapier

A drop-down menu will appear. Click anything to add it to your Slack message.

Field added to Zapier text box

You can insert as many items as you want, and even combine them with regular text. Like this:

Multiple Fields in Zapier text box

Feel free to add whatever information you think will be useful in the message.

Use formatting for your post

You might notice there are no formatting tools in our editor, but that doesn't mean you can't format your message. The trick is that you have to use Slack's formatting language, which is a variation of Markdown called mrkdwn. You can read Slack's own formatting guide for a detailed breakdown, but here's a quick list of things you can do.

  • Put words between underscores, e.g.; _italic_, for italicized text.

  • Put words between asterisks, e.g., *bold*, for bold text.

  • Put words between tildes, e.g., ~strike~, for strike-through text.

Strike through text in Slack
  • Put words between grave accents for a code block:

Strike through text in Slack
  • Begin any line of text with a greater-than sign to make a quote block:

Strike through text in Slack

You can also include links. Any raw URL will be clickable, and will also unfurl with a preview after the message. If you'd prefer not to display the URL in the message you can also do that, using this formatting:

Strike through text in Slack

Which will look like this:

Strike through text in Slack

This can all sound a little abstract, so let's put some of it to work in an example. I'm going to put the words "Just published" in italics and the title of the blog post in bold text. I'm also going to add a couple of links—one as a formatted link, the other as a raw URL:

Formatted text in Zapier editor

Note that I can format the information pulled in from the previous step of the Zap, just like any other text. Here's how the above formatting looks in Slack.

Text from Zapier showing up in Slack

Tweak the formatting until it looks just right. You can send a test to Slack to make sure everything is working properly, then go back and edit things. Again, I recommend making a testing channel for this, but you do you.

Emoji

You can also include emoji in your messages. This is done using the standard Slack formatting, which puts the name of the emoji between colons. For example, the thinking face emoji is :thinking_face:. Include that in your Zap and the thinking face emoji will show up in your Slack post. Note that this also works for custom Slack emoji.

Not sure what the emoji you want to use is called? The simplest way to find out is to open Slack, add the emoji to a message, then copy the message instead of sending it.

Copying emoji in Slack

Paste into Zapier and you should be good to go.

Customizing your bot, and other features

Done customizing your message? You can also customize how it will look. By default it will post as a bot—you can turn off this feature to post as yourself. If you decide that you want a bot, however, you can give it a custom name and icon. You can also decide whether or not to include a link to the Zap so you or your teammates can easily edit it later.

Customizing your Slack bot in Zapier

For the icon, you can use a URL to any image, or any emoji on your Slack. In my example, I named the bot "ZapierBlogBot" and used a pencil emoji for the icon. Here's how that looks again:

Bot appearance

There are a bunch more things you can add to your Slack message if you want.

Other Slack options

Here's a quick breakdown:

  • Auto-Expand links? lets you decide whether links will be expanded or not.

  • Link Usernames and Channel Names? lets you decide whether @usernames and #channels appear as clickable links in Slack.

  • Schedule At lets you define when, exactly, the message should be sent.

  • File lets you upload a file to Slack and include it with the message.

  • Thread lets you add the message to a thread. You can choose one from the dropdown, or run a search step.

  • Broadcast to Channel only applies if you're posting in a thread. It allows you to also post in the channel the thread is in.

It's a lot of options, and really lets you design a message that looks and functions exactly the way you want it.

If you'd like to start automating your work with Slack and Zapier, try one of these as a starting point:

Get Slack notifications for new Typeform entries

Get Slack notifications for new Typeform entries
  • Typeform logo
  • Slack logo
Typeform + Slack

Send Slack messages for new Calendly invites

Send Slack messages for new Calendly invites
  • Calendly logo
  • Slack logo
Calendly + Slack

Add Slack messages to a Google Sheets spreadsheet

Add Slack messages to a Google Sheets spreadsheet
  • Slack logo
  • Google Sheets logo
Slack + Google Sheets

Send Slack messages whenever Google Sheets rows are updated

Send Slack messages whenever Google Sheets rows are updated
  • Google Sheets logo
  • Slack logo
Google Sheets + Slack

Send new Gmail emails as Slack channel messages

Send new Gmail emails as Slack channel messages
  • Gmail logo
  • Slack logo
Gmail + Slack

Related reading:

  • How to automatically update your Slack status

  • How to build your own Slack bot

  • How to build a Slack bot with GPT-3

  • The best automations for Slack users

This article was originally published in December 2019 and was updated by Will Harris in March 2023 to include new screenshots and video.

Get productivity tips delivered straight to your inbox

We’ll email you 1-3 times per week—and never share your information.

tags
mentioned apps

Related articles

Improve your productivity automatically. Use Zapier to get your apps working together.

Sign up
See how Zapier works
A Zap with the trigger 'When I get a new lead from Facebook,' and the action 'Notify my team in Slack'