Step 1. Go to https://api.slack.com/apps and click Create New App
Step 2. Select the manifest option.
Step 3. Select the workspace to place the bot in.
Step 4. Navigate to JSON tab:
Step 5. Prepare the manifest file.
Here is a sample manifest you can copy and update accordingly:
{
“display_information”: {
“name”: “Preprod-bot”,
“description”: “An example app”,
“background_color”: “#523bd9”,
“long_description”: “An example app that can display actionable notifications in Slack. App contains all the necessary scopes to find a channel for publishing, and to publish a message. Enables Interactivity features to handle use of the interactive elements of the notification. Used with tutorials on api.slack.com/tutorials.”
},
“features”: {
“app_home”: {
“home_tab_enabled”: true,
“messages_tab_enabled”: false,
“messages_tab_read_only_enabled”: false
},
“bot_user”: {
“display_name”: “Skybuffer-Preprod”,
“always_online”: true
}
},
“oauth_config”: {
“redirect_urls”: [
“https://example.com/slack/auth”
],
“scopes”: {
“user”: [
“users:read”
],
“bot”: [
“channels:read”,
“chat:write”,
“chat:write.public”,
“incoming-webhook”,
“links:read”,
“channels:history”,
“im:history”,
“app_mentions:read”,
“files:read”,
“users:read”
]
}
},
“settings”: {
“event_subscriptions”: {
“request_url”: “https://example.skybuffer.com/123123-abcd-1234-1234-aa11aaa1f502/slack”,
“user_events”: [
“user_profile_changed”
],
“bot_events”: [
“app_mention”,
“channel_created”,
“channel_deleted”,
“channel_rename”,
“file_created”,
“file_public”,
“file_shared”,
“link_shared”,
“message.channels”,
“message.im”,
“user_profile_changed”
]
},
“interactivity”: {
“is_enabled”: true,
“request_url”: “https://example.skybuffer.com/123123-abcd-1234-1234-aa11aaa1a111/slack”
},
“org_deploy_enabled”: false,
“socket_mode_enabled”: false,
“token_rotation_enabled”: false
}
}
The fields in bold are the ones that mostly need updating (but you can change all the fields according to your preferences):
name, display_name , request_url.
How to change request_url:
“https://example.skybuffer.com/123123-abcd-1234-1234-aa11aaa1a111/slack” – sample link for reference
“https://example.skybuffer.com/” – this part can be found in SAP Fiori Apps:
Open the Chatbot application in the Chatbot Administration group. Select the correct tenant in the top left-hand corner. Click on the correct bot in the list to the left. This address can be copied from the Bot webhook base URL field:
123123-abcd-1234-1234-aa11aaa1a111 – this part after slash is the Channel ID. It can be taken from the Chatbot Channels application in the Chatbot Administration group.
Step 6. Finish the Bot Creation.
Click Next on JSON Manifest screen.
Click Create on the summary screen.
Step 7. Get the Application ID and the Verification Token.
Now after the bot has been created, you can retrieve all the necessary tokens needed for the channel setup in SAP.
You should see the new bot/application page with the Basic Information tab open:
Scroll down to the App Credentials section:
App ID – this field is needed for the Slack Application ID field in SAP (Chatbot Channels Configuration app), when new Slack channel is created there.
Verification Token – this field is needed for Slack channel creation in SAP.
Paste them here:
Step 8. Install to workspace.
Navigate to the OAuth & Permissions tab, and make sure you have the correct bot selected in the top left-hand corner.
Click on the Request to Install button/ Install button.
If you don’t have permissions, your install request will have to be accepted by the workspace owner first. Once your request is accepted, the text on the button will change to Install to workspace.
Allow access to the workspace:
Step 9. Copy OAuth Token.
After the app is successfully installed into your workspace, you can now see the OAuth Tokens generated in the OAuth & Permissions tab.
Bot User OAuth Token – this value needs to be pasted into SAP Channel Configuration during the channel creation.
Paste it here:
Step 9. Add the application to the workspace
Open your Slack workspace, in the left-side menu click Add app at the bottom of the page. You will see the Apps page. You are supposed to see your new app there, click on it.
Step 10. Messages Tab Activation
Go to https://api.slack.com/apps , navigate to your app page, and then to Features > App Home.
Find the Show Tabs section, and toggle on Messages Tab.
Step 11. Chat to your bot
Your bot should now be available to chat. You can use the Messages tab in the app itself, or talk in the channel if you added the app to any.