Summary
This article describes a business use case that will invoke the webMethods Developer Portal REST APIs when a message is posted in Slack channel.
Prerequisite
-
User should have a working webMethods.io Integration cloud tenant.
-
User should have a working Slack account.
-
Access to Developer Portal on the cloud tenant.
Steps to follow
-
Log in to webMethods.io Integration tenant and create a Workflow.
-
Create a new project or choose an existing project.
-
Click on the Import icon at the top right corner to import the workflow into your project.
-
Select the archive file “InvokeAPI_DevPortalFromSlack.zip” shared in the article.
-
The workflow name and description are preloaded.
-
Authorize Slack by either Default or Manual configuration.
-
Select the channel from the dropdown on successful authorization.
-
Click on “Import” to import the workflow into your project.
-
The workflow is imported successfully, enabled, and ready to use.
-
Provide mandatory inputs and select the required HTTP method, URL, Headers, Authentication and body.
-
Click Next and save the workflow.
-
Go to Slack and post a message “Try API” in the channel.
-
The slack trigger keeps listening to the slack channel and when a message is posted in slack channel, the webMethods.io flow triggers and checks for the text “Try API” in the slack message.
-
If the message matches, then the HTTP step will be invoked.
-
In our example, a Developer Portal API is tried using the REST API and the response will be recorded in the webm.io flow.
-
If You have configured a trigger to post a message to Slack channel on API Try using this Post Message in Slack Channel for operation in Developer Portal post then the API Try successful message will also be posted back in channel.
-
Any webMethods Developer Portal REST API can be triggered from slack by modifying the webm.io flow according to the requirement.
Next steps
Would you like to send some messages to a Slack channel when some operations are carried out in the Developer Portal? Please follow the steps in the post: Post Message in Slack Channel for operation in Developer Portal
Useful links | Relevant resources
InvokeAPI_DevPortalFromSlack.zip (39.5 KB)