Skip to main content
Join us at TDX in San Francisco or on Salesforce+ on March 5-6 for the Developer Conference for the AI Agent Era. Register now.

Create a Slack App

Create Your Say Hello App

You need to create a new Slack app next. For this project, you use a manifest. Manifests are YAML or JSON files that contain configurations for Slack apps or workflows. This will help speed up your work. 

  1. Click here to create a new Slack app using our manifest template. It may take a moment, but the link opens a dropdown to select the development workspace where you build and test your app.
  2. Select your workspace. Ensure it’s your Trailhead Slack Developer playground.
  3. Then, click Next. In this example, our playground workspace is selected.Select a workspace to develop your app modal with the TH-Sd07PUK3TL8P workspace highlighted in the dropdown.
  4. After you’ve selected your workspace, you see another popup: Review summary & create your app. This has information about the permissions and events your app will contain. You can review OAuth, Features, and Settings, but we cover these in more detail later. Go ahead and click Create.
  5. You automatically go to the Basic Information page for your app, currently called Sample app. Click Got It on the welcome message.
    1. You may see a few more helpful popups, click Got It on these messages.

Update Your App

Your app has some basic configuration and permissions already set up. But there’s still work to be done.

  1. Scroll down to the Display Information section and update the app’s name, short description, and background color as follows:
    • App name: Say Hello
    • Short description: Onboarding companion.
    • Background color: #2c2d30
  2. Then, click Save Changes.

Display Information section with App name, Short description, and Background color added as described in the body content.

The Basic Information page contains an overview of your app in addition to important credentials you need to use the Events and Web APIs, like the Signing Secret under the App Credentials header. If you want to, you can also update the app icon.

Change How Users See Your App

Now, let’s update how users see the app in Slack.

  1. Navigate to App Home on the sidebar, under the Features menu.
  2. Scroll to Your App’s Presence in Slack.
  3. Click Edit.
  4. Update the bot’s name and default.
    • Display Name (Bot Name): Say Hello
    • Default username: say_hello
  5. Then, click Save.

Your App’s Presence in Slack section, with Display Name (Bot Name) as Say Hello, and Default Name as say_hello

Other than updating the bot and default names, App Home is where you can update what users can see when they click on your app in Slack, like Home and Messages. We explore other configuration options next.

Note

Double Check Your App Information

You’ve just updated your app’s display details in two places, Basic Information under Settings, and App Home under Features. In the next section, you install your app. Double check that the details are saved before you install. We look for this information when we check your work.

Request Scopes and Install Your App

Permission scopes give your app permission to make Web API calls in the installed workspace (post a message, for example). You can select the scopes to add to your app by navigating to the OAuth & Permissions page.

  1. From your app’s page, select OAuth & Permissions from the sidebar.OAuth & Permissions page with the OAuth & Permissions section in the sidebar highlighted by an orange box and arrow.
  1. Scroll down to Scopes. Here you see the Bot Token Scopes channels:history and chat:write, which were included as part of creating your app from the manifest. These scopes grant your app the permission to read and post messages in public channels of which it’s a member.
Note

To listen to messages in private channels and direct messages (DMs) of which your app is a member, you need to subscribe to additional *:history scopes corresponding to the channel type. These scopes aren’t needed for this project.

  1. Head back to the top of the OAuth & Permissions page.
  2. Under OAuth Tokens, click Install to WORKSPACE. Instead of WORKSPACE, you should see your workspace name.Say Hello is requesting permission to access the TH-Sd07PUK3TL8P Slack workspace.
  3. Then, click Allow.

Upon installation, you’ll land back on the OAuth & Permissions page where you’ll see a new Bot User OAuth Access Token.

Access tokens are critical for the security of your app. They represent the permissions granted to your app by the installing user (in this case yourself). Remember to keep your access token a secret. At a minimum you should avoid checking your access token into public version control, and access it via an environment variable. The API documentation also contains a list of security best practices.

Add Your App to a Channel

Before you host, develop, and test your app, which we cover in the next step, add it to a public channel, so team members can interact with it.

  1. Open your Slack workspace.
  2. In the left-hand channels navigation, right-click the #welcome-new-team-members channel.
  3. Click View channel details.
    #welcome-new-team-members channel is selected, and the user is hovering over View channel details.
  4. Then, click the Integrations tab.
  5. Click Add an App.
    Integrations tab open for #welcome-new-team-members modal with Add an App button highlighted by a red box and arrow.
  6. If you don’t see the Say Hello app right away, search for it using the search field. Then click Add next to your app.

You can confirm the app was added by heading back to the channel. You should see in the messages that Say Hello joined.

New Team Member joined #welcome-new-team-members. Also Say Hello joined.

You’re now ready to host and develop your app!

Resources

Verify Step

+100 points

You’ll be completing this project in your own Slack Playground.

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback