Featured ArticlesProgramming

How to Create a Shortcut in Slack— A Brief Guide

Any beginner who has started out to explore the benefits of Slack would love to know how to create a shortcut in Slack. Heck, any seasoned Slack pro needs this in their locker.

Shortcuts in Slack save you time and let you manage a better workflow. 

With Slack, you can add apps to your workspace and connect services that you already use. 

When adding a shortcut on Slack, you create an entry point. It lets you get in touch with different components of work from prominent locations in Slack. It is obvious how shortcuts can serve as a gateway to productive work management.

Slack can create two types of shortcuts:

  • Global shortcuts
  • Message shortcuts 

Let’s see how these two differ.

Global shortcuts in Slack

Global shortcuts support workflows that do not rely on the context of a channel or a message. An example of a global shortcut is creating a calendar event. You can create Global shortcuts from the shortcut button. You can find it in the message composer or search for it by typing the name in the search bar.

Message shortcuts in Slack

These shortcuts come with a context menu. Message shortcuts are in the context menu of messages sent to specific users. They are also known as ephemeral messages. 

All message shortcuts keep the actual source message from where it began. This is helpful when you need to be aware of context to work when utilizing the Slack app.

Slack keyboard shortcuts include:

  • Go to Conversation: Ctrl+K
  • Go to Direct Messages (DM): Ctrl+Shift+K
  • Go to Channels: Ctrl+Shift+L
  • Go to Mentions: Ctrl+Shift+M (Desktop app only)
  • Go to People: Ctrl+Shift+E
  • Go to Saved Items: Ctrl+Shift+S
  • Go to next Section: F6
  • Go to previous Section: Shift+F6
  • Go to next Unread: Alt+Shift+Down
  • Go to previous Unread: Alt+Shift+Up
  • Go to next Channel/DM: Alt+Right
  • Go to previous Channel/DM: Alt+Left
  • Go to next Workspace: Ctrl+Tab (Windows), Ctrl+] (Linux)
  • Go to previous Workspace: Ctrl+Shift+Tab (Windows), Ctrl+Shift+[ (Linux)
  • Go to a specific Workspace: Ctrl+[number under workspace icon] (Desktop app only)
  • Go to Channel Info: Ctrl+Shift+I
  • Go to New Message: Ctrl+N
  • Go to Preferences: Ctrl+, (Desktop app only)
  • Go to Threads: Ctrl+Shift+T (Desktop app only)
  • Toggle right pane: Ctrl+.
  • Toggle Full-Screen View: Ctrl+Shift+F
  • Search current Channel/Conversation: Ctrl+F
  • Go to previous Search: Ctrl+G

How to create a shortcut in Slack?

Let’s look into a couple of steps we need to perform to create a Slack shortcut. 

Step# 1.

The first thing to do is to provide a Request URL. This ensures your app has the capacity to accept interaction payloads which depends on the internet speed requirements for your workplace.

Step# 2.

Check whether your app has a command permission scope or not. 

This is essential when it comes to creating shortcuts in Slack. 

There are two ways to get to the commands permission scope. 

A convenient method is to request it during OAuth flow. Other than that, you can add it to your Slack OAuth settings. 

This is how it works.

  • Visit your app’s dashboard.
  • Locate and click on the menu that states Scopes & Permissions.
  • Locate the tab labeled Scopes.
  • Under this tab, you would find a text field. Type in Commands.
  • Choose the correct permission and add it.
  • Click on Save Changes.

Step# 3.

Now your app is ready to create shortcuts. 

To complete this task, follow these instructions:

  • Access your app’s dashboard.
  • On the sidebar, click Interactivity & Shortcuts.
  • Click create new shortcut.
  • Decide whether to create a global shortcut or a message shortcut. Choose whatever is suitable and then hit Next.
  • Name your shortcut.
  • Add a description.
  • Mention a Callback ID. This will be sent to your Request URL in an interaction payload.
  • Click Create. This will redirect you to the “Interactivity & Shortcuts” page.
  • Click Save Changes to ensure your shortcut stays in place.

That’s it!

Each of the shortcuts that you create will appear in the main menu in the same order that you created them.

What’s Next?

You have now created a shortcut that would be sooner or later used by someone in the app. 

When that happens is Slack will receive an interaction payload. 

The app processes it and has to send out a response. 

Wondering what an interaction payload is? Let’s find out.

How does the interaction payload work?

Slack has a Request URL. The is the address to which the request will be sent when someone uses the shortcut. 

A payload parameter will be present in the request. Your app should parse it for JSON. 

Once parsed, you can find a lot of useful information inside the interaction payload. The context of interaction payload differs between a global and a message shortcut. 

A message shortcut contains a channel or a message context along with a response URL. This is essential for publishing message responses.

How do you respond to interaction payloads?

The first thing to keep in mind is that you have to send out an acknowledgment response. 

Whenever the app gets an interaction payload, it will be accompanied by a countdown. 

The message is programmed to disappear in 3 seconds. 

If there is no response from your side, it will generate a generic error. 

The person who tried to use the shortcut is informed that something went wrong.

Your app must follow up with a modal. 

This action is necessary to ensure that users feel confident when using the shortcut.

Following up with a modal guarantee that they won’t publish a message immediately. 

Using your Slack shortcuts

All the shortcuts that you create will show in the shortcuts menu. If you want to proceed from here, follow the steps below:

  • Access channel or direct message.
  • Click on the lightning bolt icon. 
  • Locate the shortcut that you need.
  • Follow the next prompt to use it.

With a message shortcut, you can move from Slack to other connected apps. 

You can take actions from message shortcuts as well. 

Let us show you how that works:

  • Move your cursor over to a message on Slack.
  • Locate the three vertical dots icon in the app.
  • Choose the shortcut that you want to work with.
  • If the shortcut of your choice is not in view yet, click on More Message Shortcuts
  • The app posts the message to the required channel or direct message.
  • Your teammates will be able to see and access it.

A Slack shortcut for chatting to users on Microsoft Teams

An extreme version of a Slack shortcut is for chatting with people outside your organization. 

If your clients or contractors aren’t using Slack, they’re likely using Microsoft Teams. 59% of IT Managers said their firms were using Microsoft Teams in 2019. This figure will have only increased as Microsoft Teams hit 115 million users in October 2020.

More importantly, MS Teams can be used as one of the best webinar tools to run webinars and meetings. As you need to be in constant contact with contractors, suppliers, and freelance content writers, switching platforms to chat with them is a major time and productivity loss.

While staying in Slack, you can send messages to external teams who use Microsoft Teams.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button