SlideShare a Scribd company logo
July 23, 2022: Slack Integration with Anypoint Platform
MuleSoft Meetups Noida
All contents © MuleSoft Inc.
Agenda
2
• Introduction
• Introduction to Slack events
• Slack Integration with Anypoint platform
• Demo
• Networking time
All contents © MuleSoft Inc.
Introductions
3
• Organizer
A SHOW OF HANDS:
Who is new to this MeetUp?
• Speaker
Shiva Sahu Jiten Chawla
Slack Events
All contents © MuleSoft Inc.
Slack Events API
5
The Events API is a streamlined, easy way to build apps and bots
that respond to activities in Slack. All you need is a Slack app and a
secure place for us to send your events.
● Subscribe the events you need and ignore the ones you don’t need.
● Events sent to you are directly tied to OAuth permissions as part of
slack app you have installed.
● Slack Apps using bots can subscribe to events related to the
channels or direct message conversations.
● Slack events can be used by 2 ways. Using POST http endpoint or
via socket mode which uses dynamic web sockets.
● In order to use slack events, appropriate permissions need to be
given to the slack app and its bot user.
All contents © MuleSoft Inc.
The Event Loop
6
Many apps built using the Events API will follow same abstract event
driven sequence:-
1. A user creates a circumstance that triggers an event subscription to
your app
2. The server receives a JSON payload describing the event.
3. Your server acknowledges receipt of the event
4. Your business logic decides what to do about that event
5. Your server carries out that decision
6. Members send messages to channel the bot belongs to. The message
might contain certain keywords which would enable server to
perform certain actions such as posting message to channel.
All contents © MuleSoft Inc.
Slack Authentication and Authorization
7
Slack will generate a bot token for authentication purposes. On a new
application creation it generates a slack app token having respective
permissions to perform certain operations.
● Permissions such as messages:read, messages:write, files:read,
files:write, channel:read etc have to be configured on the app for it
to allow to perform the respective operations.
● The app token and bot token will be configured on the server side
to authenticate and authorize the events coming.
● Slack continuous to ping the server in order to make sure of the
connection
All contents © MuleSoft Inc.
Slack Event Types
8
• Slack WebSocket message:-
{
"type": "hello",
"num_connections": 1,
"debug_info": {
"host": "applink-6bdc57fdcb-g2zht",
"build_number": 9,
"approximate_connection_time": 18060
},
"connection_info": {
"app_id": "AXXXXXX"
}
}
All contents © MuleSoft Inc. 9
● Slack Command Event:
{
"envelope_id": "9a210d14-cafd-4d89-a5f1-db0804c7da30",
"payload": {
"token": "34653sdgwsrfwaef",
"team_id": "TXXXXXXXX",
"team_domain": "ABC",
"channel_id": "C0XXXXX",
"channel_name": "mulesoft-status-channel",
"user_id": "UQXXXX",
"user_name": "jiten.chawla",
"command": "/get-status",
"text": "dev",
"api_app_id": "AXXXXX",
"is_enterprise_install": "false",
"response_url": "https://hooks.slack.com/commands/TXXXXX/3822351473239/DXXXXXXXXXXXX",
"trigger_id": "000000000.000000001.2cb9ee340cf14d4f997b8e25281b5cde"
},
"type": "slash_commands",
"accepts_response_payload": true
}
All contents © MuleSoft Inc.
Slack Integration with Anypoint Platform
● We will be using slash commands to trigger slack events.
● Slash commands acts as shortcut for specific actions
● For diff commands we will be interacting with anypoint platform
apis to perform different functions.
● We will be using Golang service as an event handler for slack
commands
● Slash commands are categorized in 3 types :-
○ Build In Slash commands :- They are default commands provided by slack.
Example /archive, /call
○ App Slash Commands :- They are created by developers for app. Example
Zoom has /zoom command and may more
○ Customised Slash commands :- These are commands that are for any new
app created in slack to perform specific tasks.
10
Demo
All contents © MuleSoft Inc. 12
All contents © MuleSoft Inc. 13
1. User will be posting messages or commands to the channel
2. On Callback or command events, golang event listener will retrieve
information requested from anypoint platform using platform apis
3. Once details are retrieved from anypoint platform api, the message
will be posted to respective channel
4. Following operations will be performed:-
a. /get-status :- Retrieve Status for all the applications deployed in anypoint
runtime manager
b. /change-status :- Start, stop or restart the application in runtime manager
c. /get-asset-info :- Get information of all the assets from anypoint exchange
part of the business group
d. /download-asset :- Download a particular asset from anypoint exchange.
All contents © MuleSoft Inc. 14
References
● Enabling interactivity with Slash Commands | Slack
● Slack API in Go
● Events API types | Slack
● API Platform API
Networking and QA
Thanks and Regards

More Related Content

PPTX
Chandigarh MuleSoft Meetup #3
Lalit Panwar
 
PDF
Building a Slack Bot Workshop @ Nearsoft OctoberTalks 2017
Rafael Antonio Gutiérrez Turullols
 
PPTX
Solace PubSub+ MuleSoft Connector for Mule 4
Manish Kumar Yadav
 
PPTX
Mule soft meetup_virtual_ 3_charlotte_07july_2021__final
Subhash Patel
 
PPTX
Liberate your Application Logging
Glenn Block
 
PPTX
MuleSoft Meetup Charlotte 2 - 2019
Subhash Patel
 
PDF
Federation Evolved: How Cloud, Mobile & APIs Change the Way We Broker Identity
CA API Management
 
PDF
Build apps for slack
Binod Jung Bogati
 
Chandigarh MuleSoft Meetup #3
Lalit Panwar
 
Building a Slack Bot Workshop @ Nearsoft OctoberTalks 2017
Rafael Antonio Gutiérrez Turullols
 
Solace PubSub+ MuleSoft Connector for Mule 4
Manish Kumar Yadav
 
Mule soft meetup_virtual_ 3_charlotte_07july_2021__final
Subhash Patel
 
Liberate your Application Logging
Glenn Block
 
MuleSoft Meetup Charlotte 2 - 2019
Subhash Patel
 
Federation Evolved: How Cloud, Mobile & APIs Change the Way We Broker Identity
CA API Management
 
Build apps for slack
Binod Jung Bogati
 

Similar to Slack Integration Noida Meetup.pptx (20)

PPTX
Mule Experience Hub and Release Channel with Java 17
Bhajan Mehta
 
PPTX
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
BrianFraser29
 
PDF
MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63
Angel Alberici
 
PDF
How to Develop Slack Bot Using Golang.pdf
Katy Slemon
 
PPTX
Slack meetup 16 02-2020
Amit Chavan
 
PPTX
Designing Apps for Runtime Fabric: Logging, Monitoring & Object Store Persist...
Eva Mave Ng
 
ODP
OAuth2 - Introduction
Knoldus Inc.
 
PPTX
#2 connected apps_calicut_31_july
JohnMathewPhilip
 
PPTX
ChatGPT and Slack Integration with MuleSoft
shyamraj55
 
PDF
apidays LIVE Paris - Potential of API integrations, common traps and advices ...
apidays
 
PDF
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
Jitendra Bafna
 
PPTX
MuleSoft Meetup Charlotte 2019
Subhash Patel
 
PPTX
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
shyamraj55
 
PDF
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
Jitendra Bafna
 
PDF
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
Jitendra Bafna
 
PDF
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PROIDEA
 
PPTX
Push notification to the open web
Ahmed Gamal
 
PPTX
Meet up slides_mumbai_05022020_final
Akshata Sawant
 
PPTX
Mulesoft Meetup Roma - Monitoring Framework & DevOps.pptx
Alfonso Martino
 
PDF
Fastlane - Automation and Continuous Delivery for iOS Apps
Sarath C
 
Mule Experience Hub and Release Channel with Java 17
Bhajan Mehta
 
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
BrianFraser29
 
MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63
Angel Alberici
 
How to Develop Slack Bot Using Golang.pdf
Katy Slemon
 
Slack meetup 16 02-2020
Amit Chavan
 
Designing Apps for Runtime Fabric: Logging, Monitoring & Object Store Persist...
Eva Mave Ng
 
OAuth2 - Introduction
Knoldus Inc.
 
#2 connected apps_calicut_31_july
JohnMathewPhilip
 
ChatGPT and Slack Integration with MuleSoft
shyamraj55
 
apidays LIVE Paris - Potential of API integrations, common traps and advices ...
apidays
 
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
Jitendra Bafna
 
MuleSoft Meetup Charlotte 2019
Subhash Patel
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
shyamraj55
 
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
Jitendra Bafna
 
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
Jitendra Bafna
 
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PROIDEA
 
Push notification to the open web
Ahmed Gamal
 
Meet up slides_mumbai_05022020_final
Akshata Sawant
 
Mulesoft Meetup Roma - Monitoring Framework & DevOps.pptx
Alfonso Martino
 
Fastlane - Automation and Continuous Delivery for iOS Apps
Sarath C
 
Ad

Recently uploaded (20)

PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
The Future of Artificial Intelligence (AI)
Mukul
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
Ad

Slack Integration Noida Meetup.pptx

  • 1. July 23, 2022: Slack Integration with Anypoint Platform MuleSoft Meetups Noida
  • 2. All contents © MuleSoft Inc. Agenda 2 • Introduction • Introduction to Slack events • Slack Integration with Anypoint platform • Demo • Networking time
  • 3. All contents © MuleSoft Inc. Introductions 3 • Organizer A SHOW OF HANDS: Who is new to this MeetUp? • Speaker Shiva Sahu Jiten Chawla
  • 5. All contents © MuleSoft Inc. Slack Events API 5 The Events API is a streamlined, easy way to build apps and bots that respond to activities in Slack. All you need is a Slack app and a secure place for us to send your events. ● Subscribe the events you need and ignore the ones you don’t need. ● Events sent to you are directly tied to OAuth permissions as part of slack app you have installed. ● Slack Apps using bots can subscribe to events related to the channels or direct message conversations. ● Slack events can be used by 2 ways. Using POST http endpoint or via socket mode which uses dynamic web sockets. ● In order to use slack events, appropriate permissions need to be given to the slack app and its bot user.
  • 6. All contents © MuleSoft Inc. The Event Loop 6 Many apps built using the Events API will follow same abstract event driven sequence:- 1. A user creates a circumstance that triggers an event subscription to your app 2. The server receives a JSON payload describing the event. 3. Your server acknowledges receipt of the event 4. Your business logic decides what to do about that event 5. Your server carries out that decision 6. Members send messages to channel the bot belongs to. The message might contain certain keywords which would enable server to perform certain actions such as posting message to channel.
  • 7. All contents © MuleSoft Inc. Slack Authentication and Authorization 7 Slack will generate a bot token for authentication purposes. On a new application creation it generates a slack app token having respective permissions to perform certain operations. ● Permissions such as messages:read, messages:write, files:read, files:write, channel:read etc have to be configured on the app for it to allow to perform the respective operations. ● The app token and bot token will be configured on the server side to authenticate and authorize the events coming. ● Slack continuous to ping the server in order to make sure of the connection
  • 8. All contents © MuleSoft Inc. Slack Event Types 8 • Slack WebSocket message:- { "type": "hello", "num_connections": 1, "debug_info": { "host": "applink-6bdc57fdcb-g2zht", "build_number": 9, "approximate_connection_time": 18060 }, "connection_info": { "app_id": "AXXXXXX" } }
  • 9. All contents © MuleSoft Inc. 9 ● Slack Command Event: { "envelope_id": "9a210d14-cafd-4d89-a5f1-db0804c7da30", "payload": { "token": "34653sdgwsrfwaef", "team_id": "TXXXXXXXX", "team_domain": "ABC", "channel_id": "C0XXXXX", "channel_name": "mulesoft-status-channel", "user_id": "UQXXXX", "user_name": "jiten.chawla", "command": "/get-status", "text": "dev", "api_app_id": "AXXXXX", "is_enterprise_install": "false", "response_url": "https://hooks.slack.com/commands/TXXXXX/3822351473239/DXXXXXXXXXXXX", "trigger_id": "000000000.000000001.2cb9ee340cf14d4f997b8e25281b5cde" }, "type": "slash_commands", "accepts_response_payload": true }
  • 10. All contents © MuleSoft Inc. Slack Integration with Anypoint Platform ● We will be using slash commands to trigger slack events. ● Slash commands acts as shortcut for specific actions ● For diff commands we will be interacting with anypoint platform apis to perform different functions. ● We will be using Golang service as an event handler for slack commands ● Slash commands are categorized in 3 types :- ○ Build In Slash commands :- They are default commands provided by slack. Example /archive, /call ○ App Slash Commands :- They are created by developers for app. Example Zoom has /zoom command and may more ○ Customised Slash commands :- These are commands that are for any new app created in slack to perform specific tasks. 10
  • 11. Demo
  • 12. All contents © MuleSoft Inc. 12
  • 13. All contents © MuleSoft Inc. 13 1. User will be posting messages or commands to the channel 2. On Callback or command events, golang event listener will retrieve information requested from anypoint platform using platform apis 3. Once details are retrieved from anypoint platform api, the message will be posted to respective channel 4. Following operations will be performed:- a. /get-status :- Retrieve Status for all the applications deployed in anypoint runtime manager b. /change-status :- Start, stop or restart the application in runtime manager c. /get-asset-info :- Get information of all the assets from anypoint exchange part of the business group d. /download-asset :- Download a particular asset from anypoint exchange.
  • 14. All contents © MuleSoft Inc. 14 References ● Enabling interactivity with Slash Commands | Slack ● Slack API in Go ● Events API types | Slack ● API Platform API