You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
5. Then head over to **Basic Information** and scroll down under the App Token section and click **Generate Token and Scopes** to generate an app-level token. Add the `connections:write` scope to this token and save the generated `xapp` token, we'll use both these tokens in just a moment.
Copy file name to clipboardExpand all lines: docs/english/tutorial/ai-chatbot/ai-chatbot.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,19 +100,19 @@ Navigate to the Bolty **App Home** and select a provider from the drop-down menu
100
100
101
101
If you don't see Bolty listed under **Apps** in your workspace right away, never fear! You can mention **@Bolty** in a public channel to add the app, then navigate to your **App Home**.
102
102
103
-

103
+

104
104
105
105
## Setting up your workflow {#workflow}
106
106
107
107
Within your development workspace, open Workflow Builder by clicking on your workspace name and then **Tools > Workflow Builder**. Select **New Workflow** > **Build Workflow**.
108
108
109
109
Click **Untitled Workflow** at the top to rename your workflow. For this tutorial, we'll call the workflow **Welcome to the channel**. Enter a description, such as _Summarizes channels for new members_, and click **Save**.
110
110
111
-

111
+

112
112
113
113
Select **Choose an event** under **Start the workflow...**, and then choose **When a person joins a channel**. Select the channel name from the drop-down menu and click **Save**.
114
114
115
-

115
+

116
116
117
117
Under **Then, do these things**, click **Add steps** and complete the following:
118
118
@@ -121,20 +121,20 @@ Under **Then, do these things**, click **Add steps** and complete the following:
121
121
3. Under **Add a message**, enter a short message, such as _Hi! Welcome to `{}The channel that the user joined`. Would you like a summary of the recent conversation?_ Note that the _`{}The channel that the user joined`_ is a variable; you can insert it by selecting **{}Insert a variable** at the bottom of the message text box.
122
122
4. Select the **Add Button** button, and name the button _Yes, give me a summary_. Click **Done**.
123
123
124
-

124
+

125
125
126
126
We'll add two more steps under the **Then, do these things** section.
127
127
128
128
First, scroll to the bottom of the list of steps and choose **Custom**, then choose **Bolty** and **Bolty Custom Function**. In the **Channel** drop-down menu, select **Channel that the user joined**. Click **Save**.
1. Choose **Messages** and then **Send a message to a person**. Under **Select a member**, choose **Person who clicked the button** from the drop-down menu.
135
135
2. Under **Add a message**, click **Insert a variable** and choose **`{}Summary`** under the **Bolty Custom Function** section in the list that appears. Click **Save**.
136
136
137
-

137
+

138
138
139
139
When finished, click **Finish Up**, then click **Publish** to make the workflow available in your workspace.
140
140
@@ -149,7 +149,7 @@ In order for Bolty to provide summaries of recent conversation in a channel, Bol
149
149
150
150
To test this, leave the channel you just invited Bolty to and rejoin it. This will kick off your workflow and you'll receive a direct message from **Welcome to the channel**. Click the **Yes, give me a summary** button, and Bolty will summarize the recent conversations in the channel you joined.
The central part of this functionality is shown in the following code snippet. Note the use of the [`user_context`](https://tools.slack.dev/deno-slack-sdk/reference/slack-types#usercontext) object, a Slack type that represents the user who is interacting with our workflow, as well as the `history` of the channel that will be summarized, which includes the ten most recent messages.
155
155
@@ -191,7 +191,7 @@ To ask Bolty a question, you can chat with Bolty in any channel the app is in. U
191
191
192
192
You can also navigate to **Bolty** in your **Apps** list and select the **Messages** tab to chat with Bolty directly.
Copy file name to clipboardExpand all lines: docs/english/tutorial/custom-steps-workflow-builder-existing/custom-steps-workflow-builder-existing.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ In order to add custom workflow steps to an app, the app also needs to be org-re
28
28
29
29
Navigate to **Org Level Apps** in the left nav and click **Opt-In**, then confirm **Yes, Opt-In**.
30
30
31
-

31
+

32
32
33
33
## Adding a new workflow step {#add-step}
34
34
@@ -54,19 +54,19 @@ Navigate to **App Manifest** in the left nav and add the `function_executed` eve
54
54
55
55
Navigate to **Workflow Steps** in the left nav and click **Add Step**. This is where we'll configure our step's inputs, outputs, name, and description.
For illustration purposes in this tutorial, we're going to write a custom step called Request Time Off. When the step is invoked, a message will be sent to the provided manager with an option to approve or deny the time-off request. When the manager takes an action (approves or denies the request), a message is posted with the decision and the manager who made the decision. The step will take two user IDs as inputs, representing the requesting user and their manager, and it will output both of those user IDs as well as the decision made.
Next, click **Finish Up**, give your workflow a name and description, then click **Publish**. Copy the link for your workflow on the next screen, then click **Done**.
270
270
271
271
### Running the workflow {#run-workflow}
272
272
273
273
In any channel where your app is installed, paste the link you copied and send it as a message. The link will unfurl into a button to start the workflow. Click the button to start the workflow. If you set yourself up as the manager, you will then see a message from your app. Pressing either button will return a confirmation or denial of your time off request.
Copy file name to clipboardExpand all lines: docs/english/tutorial/custom-steps-workflow-builder-new/custom-steps-workflow-builder-new.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ We now have a Bolt app ready for development! Open the `manifest.json` file and
58
58
59
59
Open a browser and navigate to [your apps page](https://api.slack.com/apps). This is where we will create a new app with our previously copied manifest details. Click the **Create New App** button, then select **From an app manifest** when prompted to choose how you'd like to configure your app's settings.
60
60
61
-

61
+

62
62
63
63
Next, select a workspace where you have permissions to install apps, and click **Next**. Select the **JSON** tab and clear the existing contents. Paste the contents of the `manifest.json` file you previously copied.
64
64
@@ -74,7 +74,7 @@ Another configuration setting to note is **Socket Mode**. We have turned this on
74
74
75
75
Clicking on **Workflow Steps** in the left nav will show you that one workflow step has been added! This reflects the `function` defined in our manifest: functions are workflow steps. We will get to this step's implementation later.
Click **Generate Token and Scopes**, then **Add Scope** and choose `connections:write`. Choose a name for your token and click **Generate**. Copy that value, save it somewhere accessible, and click **Done** to close out of the modal.
91
91
92
92
Next up is the bot token. We can only get this token by installing the app into the workspace. Navigate to **Install App** and click the button to install, choosing **Allow** at the next screen.
💡 Treat your tokens like passwords and keep them safe. Your app uses them to post and retrieve information from Slack workspaces. Minimally, do NOT commit them to version control.
101
101
@@ -130,59 +130,59 @@ The starter project you cloned contains a sample custom step lovingly titled “
130
130
131
131
In the Slack Client of your development workspace, open Workflow Builder by clicking on the workspace name, **Tools**, then **Workflow Builder**. Create a new workflow, then select **Build Workflow**:
132
132
133
-

133
+

134
134
135
135
Select **Choose an event** under **Start the workflow...**, then **From a link in Slack** to configure this workflow to start when someone clicks its shortcut link:
136
136
137
-

137
+

138
138
139
139
Click the **Continue** button to confirm that this is workflow should start with a shortcut link:
140
140
141
-

141
+

142
142
143
143
Find the sample step provided in the template by either searching for the name of your app (e.g., `Bolt Custom Step`) or the name of your step (e.g. `Sample step`) in the Steps search bar.
144
144
145
145
If you search by app name, any custom step that your app has defined will be listed.
146
146
147
147
Add the “Sample step" in the search results to the workflow:
148
148
149
-

149
+

150
150
151
151
As soon as you add the “Sample step" to the workflow, a modal will appear to configure the step's input—in this case, a user variable:
152
152
153
-

153
+

154
154
155
155
Configure the user input to be “Person who used this workflow”, then click the **Save** button:
156
156
157
-

157
+

158
158
159
159
Click the **Finish Up** button, then provide a name and description for your workflow.
160
160
161
161
Finally, click the **Publish** button:
162
162
163
-

163
+

164
164
165
165
Copy the shortcut link, then exit Workflow Builder and paste the link to a message in any channel you’re in:
166
166
167
-

167
+

168
168
169
169
After you send a message containing the shortcut link, the link will unfurl and you’ll see a **Start Workflow** button.
170
170
171
171
Click the **Start Workflow** button:
172
172
173
-

173
+

174
174
175
175
You should see a new direct message from your app:
176
176
177
-

177
+

178
178
179
179
The message from your app asks you to click the **Complete step** button:
180
180
181
-

181
+

182
182
183
183
Once you click the button, the direct message to you will be updated to let you know that the step interaction was successfully completed:
@@ -65,21 +65,21 @@ Here's a copy of what the modal payload looks like — this is what powers t
65
65
66
66
3. Find the base path to your server by clicking **Share**, then copy the Live site link.
67
67
68
-

68
+

69
69
70
70
4. On your app page, navigate to **Interactivity & Shortcuts**. Append "/slack/events" to your base path URL and enter it into the **Request URL** e.g., `https://festive-harmonious-march.glitch.me/slack/events`. This allows your server to retrieve information from the modal. You can see the code for this within the Glitch project.
5. Create the slash command so you can access it within Slack. Navigate to the **Slash Commands** section and create a new command. Note the **Request URL** is the same link as above, e.g. `https://festive-harmonious-march.glitch.me/slack/events` . The code that powers the slash command and opens a modal can be found within the Glitch project.
6. Select **Install App**. After you've done this, you'll see a **Bot User OAuth Access Token**, copy this.
79
79
80
80
7. Navigate to your Glitch project and click the `.env` file where the credentials are stored, and paste your bot token where the `SLACK_BOT_TOKEN` variable is shown. This allows your server to send authenticated requests to the Slack API. You'll also need to head to your app's settings page under **Basic Information** and copy the _Signing secret_ to place into the `SLACK_SIGNING_SECRET` variable.
0 commit comments