How to break your bad Slack habits

How to break your bad Slack habits

Slack is great at many things, but sometimes its casual nature can work against us. After all, it’s easy to blur the lines of workplace etiquette when you have dozens of emojis to choose from, back-and-forth banter that happens in real time, and a confusing amount of Slack channels built separately for projects, teams, and departments.  

Is your language too casual? Do you keep posting in the wrong channel? Or maybe you’re supposed to go through another coworker with a project idea before you tag the whole department—but keep forgetting? 

Navigating Slack can be tough, but there is a way to take the cringe out of any missent messages—by automatically getting rid of them. (Cue evil laughter.)

With one simple Zap—our word for automated workflows—you can delete Slack messages that contain specific keywords or phrases. Then, Zapier will send you a private message as a virtual tap on the wrist. Let’s dive in. 

New to Zapier? It’s workflow automation software that lets you focus on what matters. Combine user interfaces, data tables, and logic with 6,000+ apps to build and automate anything you can imagine. Sign up for free.

Before you begin

Before you create your Zap, you’ll need to create a Zapier account if you don’t have one already. Don’t worry, creating an account is easy and free. You’ll also need a Slack account.

Once you’re signed in, you can create new Zaps by clicking the Create Zap button or going to zap.new.

Step 1: Set up your Slack trigger

The first step is to set up your trigger (the event that starts your Zap). Search for and select Slack for your trigger app and New Message Posted to Channel for your trigger event. Click Continue.

Screenshot of Slack trigger event in Zap editor

Next, connect your Slack account, if you haven’t already, then click Continue

Now it’s time to set up your trigger. In the Channel field, choose the Slack channel you want to steer clear of when you post a message that isn’t quite right. You can also choose whether this Zap should trigger for bot messages, but as we only want to vet messages that you send, you can leave this set to No

Screenshot of Slack trigger set up in zap editor

Click Continue

Then, click Test trigger to make sure the trigger is working properly. Zapier will find a recent message you’ve sent. If you haven’t sent any messages yet, send one to your Slack account, then click Find new records to refresh the shown messages. 

Select the record you’d like to use to set up the rest of your Zap, then click Continue with selected record. 

Screenshot of test data

Step 2: Set up your Filter step

Now it’s time to add filters to your Zap. Filters allow you to set rules for your Zaps, so they only continue if the data from your app meets the condition you define. This is how we’ll vet any messages you send in Slack by looking for keywords or phrases you shouldn’t be sending. 

In your action step, search for and select Filter by Zapier in the search bar, and click Continue.

Screenshot of filter step

Next, it’s time to set up your filter rules. In each dropdown menu, you can select the fields you want the filter to check. In my instance, I want to delete any blog post ideas I’m pitching because it’s the wrong channel to do so. That’s why I’ll select a few textual keywords that I regularly use for pitching: 

Screenshot of filter steps fields

Once you’ve set up these fields, click Continue

Step 3: Set up your Slack action

Now it’s time to set up your next action—where Slack will delete your message if it meets the conditions you set up with a filter. 

Add a third step to your Zap. Search for and select Slack as your action app and Delete Message as your action event. Click Continue.

Screenshot of Slack action delete message in Zap editor

Connect your Slack account again, then click Continue.

Next, you’ll need to add the same Slack channel where you posted your original message (the same channel in your trigger). You’ll also need to map data from your previous Slack trigger by pulling in a specific value (in this case the timestamp) from the dropdown menu. Click in the Message timestamp field and select Ts from the dropdown.

Click Continue

Screenshot of Slack action set up in zap editor

Finally, test your Zap to make sure everything is set up properly. Click Test step, and the Zap will delete a message in your Slack channel if it matches the filters you added. You can check your Slack channel to see if the message has been deleted. If everything looks good, click Continue

Screenshot of Slack test data

You can now add a final step to your Zap that sends you (or someone else) a direct message with your original post. But if all you want to do is delete the message and forget about it, that’s fine too! Just remember to turn on your Zap. If you do want to send a direct message, keep reading. 

Step 4: Set up your final Slack action

Now let’s set up the very last action in this workflow. Add one more action step to your Zap.

Next, search for and select Slack as your action app and Send Direct Message as your action event. Click Continue.

Screenshot of Slack action

Select your Slack account once more and click Continue.

Now’s the fun part—setting up your action. Here, we’ll customize how the data from your previous Slack step will show up in your message, with full control over every part of the message. 

First, specify the user who you want to send this message to in the To Username field. That’ll be your Slack username. But you could also send a message to another person if a team member needs to vet any project ideas or pitches without someone else reminding you of your faux pas. In my instance, I’m sending myself an admonishment post. 

Next, you can customize your message in the Message Text field. You can add static text here and data pulled from your previous Slack step.

Screenshot of Slack message text in Zap editor

You can also customize the bot name and add an icon.

Screenshot of Slack action set up

If you don’t want a link to the Zap at the end of the message, choose the No option in the Include a link to this Zap? field. Once you’re happy with the setup, click Continue.

Finally, test your Zap to make sure everything is set up how you like it. Click Test step, and the Zap will send a message to your DMs. Here’s what it looked like for us:

Screenshot of final message in Slack

If everything looks right, you’re now ready to use your Zap. Remember to switch it on! Now, every time you accidentally post something you shouldn’t, it will automatically delete your message—and let you know about it. 

Never send the wrong message again

This workflow will help you err on the side of caution when it comes to sending the wrong messages in Slack. Whether it’s a case of mistaken identity or not getting your tone quite right, you can streamline the way you communicate with others. 

With Zapier, you have an easy, scalable, reliable way to delete messages so that you and your team can cut through the noise in Slack and stay on track. 

by Zapier