Set up
Slack Connector to connect
Workflows to a Slack workspace.
With this connection, your team can receive automated notifications, act on approval requests, and respond to incidents without leaving Slack.
External requests enable outbound network connections from your Dynatrace environment to external services. They allow you to control access to public endpoints from the AppEngine with app functions and functions in Dashboards, Notebooks, and Automations.
Go to
Settings > General > External requests.
Select New host pattern.
Add the domain names.
Select Add.
This way you can granularly control the web services your functions can connect to.
Workflows requires certain permissions to run actions on your behalf.
Other permissions are required for actions bundled with
Slack Connector.
To fine-tune permissions granted to Workflows:
app-settings:objects:readapp-settings:objects:writestate:app-states:readstate:app-states:writestate:app-states:deletestate:user-app-states:readstate:user-app-states:writestate:user-app-states:deleteFor more on general Workflows user permissions, see Manage workflow permissions.
For
Slack Connector actions to interact with your Slack workspace, you first need to create an app for Dynatrace in Slack and authorize its connection.
Go to Slack API and select Create an App.
In the Create an app window, select From an app manifest.
In the Pick a workspace to develop your app window, select the Slack workspace you want to connect to and select Next.
In the Enter app manifest below window, paste the manifest JSON provided below into the JSON tab.
Replace <app-name> and <bot-name> with values of your choice, for example, Dynatrace.
For more information on the manifest JSON, see Slack documentation.
{"_metadata": {"major_version": 2,"minor_version": 1},"display_information": {"name": "<app-name>"},"features": {"bot_user": {"display_name": "<bot-name>","always_online": false}},"oauth_config": {"scopes": {"bot": ["channels:join","channels:read","groups:read","chat:write","chat:write.public","files:read","files:write","reactions:read","reactions:write","users:read.email"]}},"settings": {"org_deploy_enabled": false,"socket_mode_enabled": false,"token_rotation_enabled": false}}
If you only need to send plain-text or Markdown messages to channels and don't require file attachments, emoji reactions, or Workflow approvals, you can use a smaller scope set to reduce the token's exposure and simplify workspace admin approval.
{"_metadata": {"major_version": 2,"minor_version": 1},"display_information": {"name": "<app-name>"},"features": {"bot_user": {"display_name": "<bot-name>","always_online": false}},"oauth_config": {"scopes": {"bot": ["channels:read","groups:read","chat:write"]}},"settings": {"org_deploy_enabled": false,"socket_mode_enabled": false,"token_rotation_enabled": false}}
Select Install to Workspace and confirm the permissions. The app should now be available in the Slack Workspace.
For more information about the required Slack scopes, see Required Slack Bot permissions.
Your Dynatrace Slack Connector requires an OAuth token to authorize sending messages to Slack.
When no Signing Secret is configured or Allow external approvals is disallowed, the Request Approval action sends an approval link via the Slack message.
To fully use the Request Approval action from Slack Connector:
The scopes you need depend on which connector features you use. The following table shows what each scope allows.
| Use-case | Required scopes |
|---|---|
Send messages to channels |
|
Auto-join public channels if the bot is not already a member |
|
Upload file attachments with messages |
|
Add emoji reactions to messages |
|
Send approval requests to channels |
|
After adding or changing scopes in Slack API under OAuth & Permissions, reinstall the app to regenerate the bot token with the updated scopes. Then update the token in Dynatrace under Settings > Connections > Connectors > Slack.