1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
#WorkflowStep
Have you ever wanted to run an app from a Slack workflow? This sample app shows you how it works.
Slack describes some of the basics here:
https://api.slack.com/workflows/steps
https://api.slack.com/tutorials/workflow-builder-steps
1. Start the example app localy on port 8080
2. Use ngrok to expose your app to the internet
```shell
./ngrok http 8080
```
Copy the https forwarding URL and paste it into the app manifest down below (event_subscription request_url and interactivity request_url)
3. Create a new Slack App at api.slack.com/apps from an app manifest
The manifest of a sample Slack App looks like this:
```yaml
display_information:
name: Workflowstep-Example
features:
bot_user:
display_name: Workflowstep-Example
always_online: false
workflow_steps:
- name: Example Step
callback_id: example-step
oauth_config:
scopes:
bot:
- workflow.steps:execute
settings:
event_subscriptions:
request_url: https://*****.ngrok.io/api/v1/example-step
bot_events:
- workflow_step_execute
interactivity:
is_enabled: true
request_url: https://*****.ngrok.io/api/v1/interaction
org_deploy_enabled: false
socket_mode_enabled: false
token_rotation_enabled: false
```
("Interactivity" and "Enable Events" should be turned on)
4. Slack Workflow (**paid plan required!**)
1. Create a new Workflow at app.slack.com/workflow-builder
2. give it a name
3. select "Planned date & time"
4. add another step and select "Example Step" from App Workflowstep-Example
5. configure your app and hit save
6. don't forget to publish your workflow
|