Slack api documentation9/4/2023 ![]() Choose the Local option so you can interact with your app while developing locally. When you select your workspace, you will be prompted to choose an app environment for the trigger. Select an authorized workspace in which to install the app. Since you haven't installed this trigger to a workspace yet, you'll be prompted to install the trigger to a new workspace. To create the trigger, use the trigger create command: $ slack trigger create -trigger-def "triggers/greeting_trigger.ts" The only thing we need to do so that the app will work correctly is to create the one trigger it uses to kick things off. Since this is a working sample app, it comes pre-baked with working code. It's used by the CLI to create a type of trigger called a "Link trigger." Inside the triggers folder, there's a file called greeting_trigger.ts. We'll talk about triggers and the specific kind we're going to create in the next section. With our project ready, it's time to take it for a spin - but before we do, we have one more thing to do, which is to create the trigger that we'll use to kick off our workflow. This is a great place to store the icon that your app will display when users interact with it. Import_map.json: a helper file for Deno that specifies where modules should be imported from.Īssets/: a place to store assets related with the project. gitignore and should not be checked in to version control. slack/ once you begin building: this file is in. This directory must be checked into your version control. slack/: a home for internal configuration files, scripts hooks, and the app SDK. This contains your app's manifest, which is where we can configure things like bot scopes and tell our app about our workflows. The next place to look is the manifest.ts file. ![]() These are where the definitions and implementations for the inner workings of your app live. The first place to direct your attention are the functions, triggers, and workflows folders. Let's take a look at what's inside our new "Hello World" project directory: LICENSE Once you have your new project ready to go, change into your project directory. ![]() Or, you can use the pre-built Hello World app: slack create hello-world-app -template įor this tutorial, we'll use the pre-built app. You can create a blank app with the Slack CLI using the following command: slack create hello-world-app -template We can create our "Hello World" app in one of two ways: Use a blank app ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |