Invoke webMethods Developer Portal REST APIs by posting a message in Slack channel

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

  1. Log in to webMethods.io Integration tenant and create a Workflow.

  2. Create a new project or choose an existing project.

  3. Click on the Import icon at the top right corner to import the workflow into your project.

  4. Select the archive file “InvokeAPI_DevPortalFromSlack.zip” shared in the article.

  5. The workflow name and description are preloaded.

  6. Authorize Slack by either Default or Manual configuration.

  7. Select the channel from the dropdown on successful authorization.

  8. Click on “Import” to import the workflow into your project.

  9. The workflow is imported successfully, enabled, and ready to use.

  10. Provide mandatory inputs and select the required HTTP method, URL, Headers, Authentication and body.

  11. Click Next and save the workflow.

  12. Go to Slack and post a message “Try API” in the channel.

  13. 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.

  14. If the message matches, then the HTTP step will be invoked.

  15. In our example, a Developer Portal API is tried using the REST API and the response will be recorded in the webm.io flow.

  16. 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.

  17. 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)

2 Likes

A useful scenario. Very well explained