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/guides/bolt-basics.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,19 +31,20 @@ Here is the list of the available methods to dispatch events.
31
31
32
32
|Method|Constraints (value: type)|Description|
33
33
|-|-|-|
34
-
|`app.event`|event type: `Class\<Event\>`|[Events API](/guides/events-api): Responds to any kinds of bot/user events you subscribe.|
35
-
|`app.message`|keyword: `String`\|`Pattern`|[Events API](/guides/events-api): Responds to messages posted by a user only when the text in messages matches the given keyword or regular expressions.|
36
-
|`app.command`|command name: `String`\|`Pattern`|[Slash Commands](/guides/slash-commands): Responds to slash command invocations in the workspace.|
34
+
|`app.attachmentAction`|callback_id: `String`\|`Pattern`|Legacy Messaging: Responds to user actions in attachments. These events can be triggered in only messages.|
37
35
|`app.blockAction`|action_id: `String`\|`Pattern`|[Interactive Components](/guides/interactive-components): Responds to user actions (e.g., click a button, choose an item from select menus, radio buttons, etc.) in `blocks`. These events can be triggered in all the surfaces (messages, modals, and Home tabs).|
38
36
|`app.blockSuggestion`|action_id: `String`\|`Pattern`|[Interactive Components](/guides/interactive-components): Responds to user actions to input a keyword (the length needs to be the `min_query_length` or longer) in select menus (external data source).|
39
-
|`app.viewSubmission`|callback_id: `String`\|`Pattern`|[Modals](/guides/modals): Responds to data submissions in modals.|
40
-
|`app.viewClosed`|callback_id: `String`\|`Pattern`|[Modals](/guides/modals): Responds to the events where users close modals by clicking Cancel buttons. The `notify_on_close` has to be `true` when opening/pushing the modal.|
41
-
|`app.globalShortcut`|callback_id: `String`\|`Pattern`|[Shortcuts](/guides/shortcuts): Responds to global shortcut invocations.|
42
-
|`app.messageShortcut`|callback_id: `String`\|`Pattern`|[Shortcuts](/guides/shortcuts): Responds to shortcut invocations in message menus.|
37
+
|`app.command`|command name: `String`\|`Pattern`|[Slash Commands](/guides/slash-commands): Responds to slash command invocations in the workspace.|
38
+
|`app.dialogCancellation`|callback_id `String`\|`Pattern`|Dialogs: Responds to the events where users close dialogs by clicking Cancel buttons.|
43
39
|`app.dialogSubmission`|callback_id: `String`\|`Pattern`|Dialogs: Responds to data submissions in dialogs.|
44
40
|`app.dialogSuggestion`|callback_id: `String`\|`Pattern`|Dialogs: Responds to requests to load options for `"external"` typed select menus in dialogs.|
45
-
|`app.dialogCancellation`|callback_id `String`\|`Pattern`|Dialogs: Responds to the events where users close dialogs by clicking Cancel buttons.|
46
-
|`app.attachmentAction`|callback_id: `String`\|`Pattern`|Legacy Messaging: Responds to user actions in attachments. These events can be triggered in only messages.|
41
+
|`app.event`|event type: `Class\<Event\>`|[Events API](/guides/events-api): Responds to any kinds of bot/user events you subscribe.|
42
+
| `app.function` | callback_id: `String`\|`Pattern` | [Custom steps](/guides/custom-steps): Defines a function that can be used as a custom step in [Workflow Builder](https://slack.com/help/articles/360035692513-Guide-to-Slack-Workflow-Builder).
43
+
|`app.globalShortcut`|callback_id: `String`\|`Pattern`|[Shortcuts](/guides/shortcuts): Responds to global shortcut invocations.|
44
+
|`app.message`|keyword: `String`\|`Pattern`|[Events API](/guides/events-api): Responds to messages posted by a user only when the text in messages matches the given keyword or regular expressions.|
45
+
|`app.messageShortcut`|callback_id: `String`\|`Pattern`|[Shortcuts](/guides/shortcuts): Responds to shortcut invocations in message menus.|
46
+
|`app.viewClosed`|callback_id: `String`\|`Pattern`|[Modals](/guides/modals): Responds to the events where users close modals by clicking Cancel buttons. The `notify_on_close` has to be `true` when opening/pushing the modal.|
47
+
|`app.viewSubmission`|callback_id: `String`\|`Pattern`|[Modals](/guides/modals): Responds to data submissions in modals.|
Copy file name to clipboardExpand all lines: docs/content/guides/custom-steps.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Custom Steps
3
3
lang: en
4
4
---
5
5
6
-
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 string. 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.
6
+
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 `string`. 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.
7
7
8
8
*`complete()` requires one argument: an `outputs` object. It ends your custom step successfully and provides an object containing the outputs of your custom step as per its definition.
9
9
*`fail()` requires one argument: `error` of type `string`. It ends your custom step unsuccessfully and provides a message containing information regarding why your custom step failed.
0 commit comments