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
Copy file name to clipboardExpand all lines: docs/content/concepts/acknowledge.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ slug: /concepts/acknowledge
6
6
7
7
Actions, commands, shortcuts, options requests, and view submissions must **always** be acknowledged using the `ack()` function. This lets Slack know that the request was received so that it may update the Slack user interface accordingly.
8
8
9
-
Depending on the type of request, your acknowledgement may be different. For example, when acknowledging a menu selection associated with an external data source, you would call `ack()` with a list of relevant [options](https://api.slack.com/reference/block-kit/composition-objects#option). When acknowledging a view submission, you may supply a `response_action` as part of your acknowledgement to [update the view](/concepts/view_submissions).
9
+
Depending on the type of request, your acknowledgement may be different. For example, when acknowledging a menu selection associated with an external data source, you would call `ack()` with a list of relevant [options](https://docs.slack.dev/reference/block-kit/composition-objects/option-object/). When acknowledging a view submission, you may supply a `response_action` as part of your acknowledgement to [update the view](/concepts/view_submissions).
10
10
11
11
We recommend calling `ack()` right away before initiating any time-consuming processes such as fetching information from your database or sending a new message, since you only have 3 seconds to respond before Slack registers a timeout error.
Copy file name to clipboardExpand all lines: docs/content/concepts/actions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ def approve_request(ack, say):
62
62
63
63
### Using `respond()` method
64
64
65
-
Since `respond()` is a utility for calling the `response_url`, it behaves in the same way. You can pass [all the message payload properties](https://api.slack.com/reference/messaging/payload) as keyword arguments along with optional properties like `response_type` (which has a value of `"in_channel"` or `"ephemeral"`), `replace_original`, `delete_original`, `unfurl_links`, and `unfurl_media`. With that, your app can send a new message payload that will be published back to the source of the original interaction.
65
+
Since `respond()` is a utility for calling the `response_url`, it behaves in the same way. You can pass [all the message payload properties](https://docs.slack.dev/messaging/#payloads) as keyword arguments along with optional properties like `response_type` (which has a value of `"in_channel"` or `"ephemeral"`), `replace_original`, `delete_original`, `unfurl_links`, and `unfurl_media`. With that, your app can send a new message payload that will be published back to the source of the original interaction.
66
66
67
67
```python
68
68
# Listens to actions triggered with action_id of “user_select”
Copy file name to clipboardExpand all lines: docs/content/concepts/ai-apps.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
@@ -8,21 +8,21 @@ slug: /concepts/ai-apps
8
8
If you don't have a paid workspace for development, you can join the [Developer Program](https://api.slack.com/developer-program) and provision a sandbox with access to all Slack features for free.
9
9
:::
10
10
11
-
AI apps comprise a new messaging experience for Slack. If you're unfamiliar with using AI apps within Slack, you'll want to read the [API documentation on the subject](https://api.slack.com/docs/apps/ai). Then come back here to implement them with Bolt!
11
+
AI apps comprise a new messaging experience for Slack. If you're unfamiliar with using AI apps within Slack, you'll want to read the [API documentation on the subject](https://docs.slack.dev/ai/). Then come back here to implement them with Bolt!
12
12
13
13
## Configuring your app to support AI features {#configuring-your-app}
14
14
15
15
1. Within [App Settings](https://api.slack.com/apps), enable the **Agents & AI Apps** feature.
16
16
17
17
2. Within the App Settings **OAuth & Permissions** page, add the following scopes:
You _could_ implement your own AI app by [listening](event-listening) for the `assistant_thread_started`, `assistant_thread_context_changed`, and `message.im` events (see implementation details below). That being said, using the `Assistant` class will streamline the process. And we already wrote this nice guide for you!
@@ -32,9 +32,9 @@ You _could_ implement your own AI app by [listening](event-listening) for the `a
32
32
33
33
The `Assistant` class can be used to handle the incoming events expected from a user interacting with an AI app in Slack. A typical flow would look like:
34
34
35
-
1.[The user starts a thread](#handling-a-new-thread). The `Assistant` class handles the incoming [`assistant_thread_started`](https://api.slack.com/events/assistant_thread_started) event.
36
-
2.[The thread context may change at any point](#handling-thread-context-changes). The `Assistant` class can handle any incoming [`assistant_thread_context_changed`](https://api.slack.com/events/assistant_thread_context_changed) events. The class also provides a default context store to keep track of thread context changes as the user moves through Slack.
37
-
3.[The user responds](#handling-the-user-response). The `Assistant` class handles the incoming [`message.im`](https://api.slack.com/events/message.im) event.
35
+
1.[The user starts a thread](#handling-a-new-thread). The `Assistant` class handles the incoming [`assistant_thread_started`](https://docs.slack.dev/reference/events/assistant_thread_started) event.
36
+
2.[The thread context may change at any point](#handling-thread-context-changes). The `Assistant` class can handle any incoming [`assistant_thread_context_changed`](https://docs.slack.dev/reference/events/assistant_thread_context_changed) events. The class also provides a default context store to keep track of thread context changes as the user moves through Slack.
37
+
3.[The user responds](#handling-the-user-response). The `Assistant` class handles the incoming [`message.im`](https://docs.slack.dev/reference/events/message.im) event.
While the `assistant_thread_started` and `assistant_thread_context_changed` events do provide Slack-client thread context information, the `message.im` event does not. Any subsequent user message events won't contain thread context data. For that reason, Bolt not only provides a way to store thread context — the `threadContextStore` property — but it also provides an instance that is utilized by default. This implementation relies on storing and retrieving [message metadata](https://api.slack.com/metadata/using) as the user interacts with the app.
100
+
While the `assistant_thread_started` and `assistant_thread_context_changed` events do provide Slack-client thread context information, the `message.im` event does not. Any subsequent user message events won't contain thread context data. For that reason, Bolt not only provides a way to store thread context — the `threadContextStore` property — but it also provides an instance that is utilized by default. This implementation relies on storing and retrieving [message metadata](https://docs.slack.dev/messaging/message-metadata/) as the user interacts with the app.
101
101
102
102
If you do provide your own `threadContextStore` property, it must feature `get` and `save` methods.
103
103
@@ -107,15 +107,15 @@ Refer to the [module document](https://tools.slack.dev/bolt-python/api-docs/slac
107
107
108
108
## Handling a new thread {#handling-a-new-thread}
109
109
110
-
When the user opens a new thread with your AI app, the [`assistant_thread_started`](https://api.slack.com/events/assistant_thread_started) event will be sent to your app.
110
+
When the user opens a new thread with your AI app, the [`assistant_thread_started`](https://docs.slack.dev/reference/events/assistant_thread_started) event will be sent to your app.
111
111
112
112
:::tip
113
113
When a user opens an AI app thread while in a channel, the channel info is stored as the thread's `AssistantThreadContext` data. You can grab that info by using the `get_thread_context` utility, as subsequent user message event payloads won't include the channel info.
114
114
:::
115
115
116
116
### Block Kit interactions in the AI app thread {#block-kit-interactions}
117
117
118
-
For advanced use cases, Block Kit buttons may be used instead of suggested prompts, as well as the sending of messages with structured [metadata](https://api.slack.com/metadata) to trigger subsequent interactions with the user.
118
+
For advanced use cases, Block Kit buttons may be used instead of suggested prompts, as well as the sending of messages with structured [metadata](https://docs.slack.dev/messaging/message-metadata/) to trigger subsequent interactions with the user.
119
119
120
120
For example, an app can display a button such as "Summarize the referring channel" in the initial reply. When the user clicks the button and submits detailed information (such as the number of messages, days to check, purpose of the summary, etc.), the app can handle that information and post a message that describes the request with structured metadata.
When the user switches channels, the [`assistant_thread_context_changed`](https://api.slack.com/events/assistant_thread_context_changed) event will be sent to your app.
244
+
When the user switches channels, the [`assistant_thread_context_changed`](https://docs.slack.dev/reference/events/assistant_thread_context_changed) event will be sent to your app.
245
245
246
-
If you use the built-in `Assistant` middleware without any custom configuration, the updated context data is automatically saved as [message metadata](https://api.slack.com/metadata/using) of the first reply from the app.
246
+
If you use the built-in `Assistant` middleware without any custom configuration, the updated context data is automatically saved as [message metadata](https://docs.slack.dev/messaging/message-metadata/) of the first reply from the app.
247
247
248
248
As long as you use the built-in approach, you don't need to store the context data within a datastore. The downside of this default behavior is the overhead of additional calls to the Slack API. These calls include those to `conversations.history`, which are used to look up the stored message metadata that contains the thread context (via `get_thread_context`).
## Handling the user response {#handling-the-user-response}
258
258
259
-
When the user messages your app, the [`message.im`](https://api.slack.com/events/message.im) event will be sent to your app.
259
+
When the user messages your app, the [`message.im`](https://docs.slack.dev/reference/events/message.im) event will be sent to your app.
260
260
261
-
Messages sent to the app do not contain a [subtype](https://api.slack.com/events/message#subtypes) and must be deduced based on their shape and any provided [message metadata](https://api.slack.com/metadata/using).
261
+
Messages sent to the app do not contain a [subtype](https://docs.slack.dev/reference/events/message#subtypes) and must be deduced based on their shape and any provided [message metadata](https://docs.slack.dev/messaging/message-metadata/).
262
262
263
263
There are three utilities that are particularly useful in curating the user experience:
Copy file name to clipboardExpand all lines: docs/content/concepts/app-home.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ lang: en
4
4
slug: /concepts/app-home
5
5
---
6
6
7
-
[Home tabs](https://api.slack.com/surfaces/tabs/using) are customizable surfaces accessible via the sidebar and search that allow apps to display views on a per-user basis. After enabling App Home within your app configuration, home tabs can be published and updated by passing a `user_id` and [view payload](https://api.slack.com/reference/block-kit/views) to the [`views.publish`](https://api.slack.com/methods/views.publish) method.
7
+
[Home tabs](https://docs.slack.dev/surfaces/app-home) are customizable surfaces accessible via the sidebar and search that allow apps to display views on a per-user basis. After enabling App Home within your app configuration, home tabs can be published and updated by passing a `user_id` and [view payload](https://docs.slack.dev/reference/interaction-payloads/view-interactions-payload/#view_submission) to the [`views.publish`](https://docs.slack.dev/reference/methods/views.publis) method.
8
8
9
-
You can subscribe to the [`app_home_opened`](https://api.slack.com/events/app_home_opened) event to listen for when users open your App Home.
9
+
You can subscribe to the [`app_home_opened`](https://docs.slack.dev/reference/events/app_home_opened) event to listen for when users open your App Home.
10
10
11
11
Refer to [the module document](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) to learn the available listener arguments.
Copy file name to clipboardExpand all lines: docs/content/concepts/authenticating-oauth.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ Bolt for Python will create a **Redirect URL** `slack/oauth_redirect`, which Sla
10
10
11
11
Bolt for Python will also create a `slack/install` route, where you can find an **Add to Slack** button for your app to perform direct installs of your app. If you need any additional authorizations (user tokens) from users inside a team when your app is already installed or a reason to dynamically generate an install URL, you can pass your own custom URL generator to `oauth_settings` as `authorize_url_generator`.
12
12
13
-
Bolt for Python automatically includes support for [org wide installations](https://api.slack.com/enterprise/apps) in version `1.1.0+`. Org wide installations can be enabled in your app configuration settings under **Org Level Apps**.
13
+
Bolt for Python automatically includes support for [org wide installations](https://docs.slack.dev/enterprise-grid/) in version `1.1.0+`. Org wide installations can be enabled in your app configuration settings under **Org Level Apps**.
14
14
15
-
To learn more about the OAuth installation flow with Slack, [read the API documentation](https://api.slack.com/authentication/oauth-v2).
15
+
To learn more about the OAuth installation flow with Slack, [read the API documentation](https://docs.slack.dev/authentication/installing-with-oauth).
Copy file name to clipboardExpand all lines: docs/content/concepts/custom-steps.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ lang: en
5
5
slug: /concepts/custom-steps
6
6
---
7
7
8
-
Your app can use the `function()` method to listen to incoming [custom step requests](https://api.slack.com/automation/functions/custom-bolt). Custom steps are used in Workflow Builder to build workflows. The method requires a step `callback_id` of type `str`. This `callback_id` must also be defined in your [Function](https://api.slack.com/concepts/manifests#functions) definition. Custom steps must be finalized using the `complete()` or `fail()` listener arguments to notify Slack that your app has processed the request.
8
+
Your app can use the `function()` method to listen to incoming [custom step requests](https://docs.slack.dev/workflows/workflow-steps). Custom steps are used in Workflow Builder to build workflows. The method requires a step `callback_id` of type `str`. This `callback_id` must also be defined in your [Function](https://docs.slack.dev/reference/app-manifest#functions) definition. Custom steps must be finalized using the `complete()` or `fail()` listener arguments to notify Slack that your app has processed the request.
9
9
10
10
*`complete()` requires **one** argument: `outputs` of type `dict`. It ends your custom step **successfully** and provides a dictionary containing the outputs of your custom step as per its definition.
11
11
*`fail()` requires **one** argument: `error` of type `str`. It ends your custom step **unsuccessfully** and provides a message containing information regarding why your custom step failed.
@@ -151,4 +151,4 @@ Example app manifest definition
151
151
152
152
</details>
153
153
154
-
Learn more about responding to interactivity, see the [Slack API documentation](https://api.slack.com/automation/functions/custom-bolt#interactivity).
154
+
Learn more about responding to interactivity, see the [Slack API documentation](https://docs.slack.dev/interactivity/handling-user-interaction).
Copy file name to clipboardExpand all lines: docs/content/concepts/event-listening.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ lang: en
4
4
slug: /concepts/event-listening
5
5
---
6
6
7
-
You can listen to [any Events API event](https://api.slack.com/events) using the `event()` method after subscribing to it in your app configuration. This allows your app to take action when something happens in a workspace where it's installed, like a user reacting to a message or joining a channel.
7
+
You can listen to [any Events API event](https://docs.slack.dev/reference/events) using the `event()` method after subscribing to it in your app configuration. This allows your app to take action when something happens in a workspace where it's installed, like a user reacting to a message or joining a channel.
8
8
9
9
The `event()` method requires an `eventType` of type `str`.
The `message()` listener is equivalent to `event("message")`.
25
25
26
-
You can filter on subtypes of events by passing in the additional key `subtype`. Common message subtypes like `bot_message` and `message_replied` can be found [on the message event page](https://api.slack.com/events/message#subtypes).
26
+
You can filter on subtypes of events by passing in the additional key `subtype`. Common message subtypes like `bot_message` and `message_replied` can be found [on the message event page](https://docs.slack.dev/reference/events/message#subtypes).
27
27
You can explicitly filter for events without a subtype by explicitly setting `None`.
Copy file name to clipboardExpand all lines: docs/content/concepts/message-listening.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ lang: en
4
4
slug: /concepts/message-listening
5
5
---
6
6
7
-
To listen to messages that [your app has access to receive](https://api.slack.com/messaging/retrieving#permissions), you can use the `message()` method which filters out events that aren't of type `message`.
7
+
To listen to messages that [your app has access to receive](https://docs.slack.dev/messaging/retrieving-messages), you can use the `message()` method which filters out events that aren't of type `message`.
8
8
9
9
`message()` accepts an argument of type `str` or `re.Pattern` object that filters out any messages that don't match the pattern.
Copy file name to clipboardExpand all lines: docs/content/concepts/message-sending.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ def ask_who(message, say):
20
20
21
21
`say()` accepts more complex message payloads to make it easy to add functionality and structure to your messages.
22
22
23
-
To explore adding rich message layouts to your app, read through [the guide on our API site](https://api.slack.com/messaging/composing/layouts) and look through templates of common app flows [in the Block Kit Builder](https://api.slack.com/tools/block-kit-builder?template=1).
23
+
To explore adding rich message layouts to your app, read through [the guide on our API site](https://docs.slack.dev/messaging/#structure) and look through templates of common app flows [in the Block Kit Builder](https://api.slack.com/tools/block-kit-builder?template=1).
24
24
25
25
```python
26
26
# Sends a section block with datepicker when someone reacts with a 📅 emoji
0 commit comments