SlideShare a Scribd company logo
1 of 16
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

Similar to Slack Integration Noida Meetup.pptx

Similar to Slack Integration Noida Meetup.pptx (20)

Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
 
MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63
MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63
MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63
 
How to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdfHow to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdf
 
Slack meetup 16 02-2020
Slack meetup 16 02-2020Slack meetup 16 02-2020
Slack meetup 16 02-2020
 
Designing Apps for Runtime Fabric: Logging, Monitoring & Object Store Persist...
Designing Apps for Runtime Fabric: Logging, Monitoring & Object Store Persist...Designing Apps for Runtime Fabric: Logging, Monitoring & Object Store Persist...
Designing Apps for Runtime Fabric: Logging, Monitoring & Object Store Persist...
 
OAuth2 - Introduction
OAuth2 - IntroductionOAuth2 - Introduction
OAuth2 - Introduction
 
#2 connected apps_calicut_31_july
#2 connected apps_calicut_31_july#2 connected apps_calicut_31_july
#2 connected apps_calicut_31_july
 
ChatGPT and Slack Integration with MuleSoft
ChatGPT and Slack Integration with MuleSoftChatGPT and Slack Integration with MuleSoft
ChatGPT and Slack Integration with MuleSoft
 
apidays LIVE Paris - Potential of API integrations, common traps and advices ...
apidays LIVE Paris - Potential of API integrations, common traps and advices ...apidays LIVE Paris - Potential of API integrations, common traps and advices ...
apidays LIVE Paris - Potential of API integrations, common traps and advices ...
 
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
 
MuleSoft Meetup Charlotte 2019
MuleSoft Meetup Charlotte  2019MuleSoft Meetup Charlotte  2019
MuleSoft Meetup Charlotte 2019
 
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer ToolsDevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
 
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
 
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
 
Push notification to the open web
Push notification to the open webPush notification to the open web
Push notification to the open web
 
Meet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalMeet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_final
 
Mulesoft Meetup Roma - Monitoring Framework & DevOps.pptx
Mulesoft Meetup Roma - Monitoring Framework & DevOps.pptxMulesoft Meetup Roma - Monitoring Framework & DevOps.pptx
Mulesoft Meetup Roma - Monitoring Framework & DevOps.pptx
 
Fastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS AppsFastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS Apps
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

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