In order to develop on the next-generation platform, your workspace must be on a paid plan.
Before you can create (or remove) an app, ensure your CLI is authenticated into the workspace you want to develop in. You can do so with the
slack auth list command:
$ slack auth list myworkspace (Team ID: T123456789) User ID: U123456789 Last update: 2022-03-24 18:20:47 -07:00 Authorization Level: Workspace To change your active workspace authorization run slack login
With your CLI authenticated into the workspace you want to develop in, the next step is to scaffold an app with the
slack create command:
$ slack create my-app
The above command will scaffold a new app called
my-app in a directory with the same name. If you don't pass an app name,
slack will scaffold an app with a random alphanumeric name.
You will be presented with three options to build from:
? Select a template to build from: [Use arrows to move] > Issue submission (default sample) Basic app that demonstrates an issue submission workflow Scaffolded project Solid foundation that includes a Slack datastore Blank project A, well.. blank project View more samples Guided tutorials can be found at api.slack.com/automation/samples
Once you select an option the Slack CLI will get you set up for success.
$ slack create my-app ⚙️ Creating a new Slack app in ~/programming/my-app 📦 Installed project dependencies ✨ my-app successfully created 🧭 Explore the documentation to learn more Read the README.md or peruse the docs over at api.slack.com/automation Find available commands and usage info with `slack help` 📋 Follow the steps below to begin development Change into your project directory with `cd my-app` Develop locally and see changes in real-time with `slack run` When you're ready to deploy for production use `slack deploy` Create a trigger to invoke your workflows `slack trigger create`
After creating an app, don't forget to
cd into your app project's directory.
➡️ To keep building your own app, learn about your app's manifest in the manifest section.
⤵️ To use a sample app as a template instead, read on!
We have a collection of sample apps containing a bevy of use cases. Find one particularly suited for your needs? Great! You can use it as a template to build from.
Create an app from a template by using the
create command with the
-t) flag and passing the link to the template's Github repo.
For example, the following command creates an app using our Welcome Bot app as a template:
slack create my-welcome-bot-app -t https://github.com/slack-samples/deno-welcome-bot
Use a specific branch of a template repo by using the
-b) flag and passing the name of a branch:
slack create my-welcome-bot-app -t https://github.com/slack-samples/deno-welcome-bot -b main
All good things must come to an end. You can uninstall your app if you need to remove an app from a workspace, change app permissions, or delete the app in its entirety. To uninstall an app using the CLI, use the
slack uninstall command. Then, choose the workspace you want to remove the app from.
Choose a workspace my-workspace T123ABC456 my-app U123ABC456 ❗ Danger zone! Uninstalling your app will also delete: - the app, workflows, and functions from this workspace - all app data and datastores from this workspace ❓ Are you sure you want to uninstall? Yes 🏠 Workspace uninstall Uninstalled the app "my-app" from workspace "workspace" 📚 App Manifest Deleted the app manifest for "my-app" from workspace "workspace" 🏘️ Installed Workspaces There are no workspaces with the app installed
Check out more about how to configure your app via the manifest. You can also start building functions to perform some logic, chain them together in workflows, and create triggers to invoke those workflows.
Have 2 minutes to provide some feedback?
We'd love to hear about your experience building modular Slack apps. Please complete our short survey so we can use your feedback to improve.