DEV Community

Tech Community for Software AG Tech Community

Posted on • Originally published at tech.forums.softwareag.com on

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.

Pre-requisite

  • 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. Login to webMethods.ioIntegration tenant and create a Workflow.
  2. Create a new project or choose an existing project.
  3. Click on Import icon on the top right corner to import the workflow into your project. import_workflow
  4. Select the archive file “InvokeAPI_DevPortalFromSlack.zip” shared in the article.
  5. The workflow name and description are preloaded. workflow_settings
  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. workflow_imported
  10. Provide mandatory inputs and select the required HTTP method, URL, Headers, Authentication and body. http_action http_action2
  11. Click Next and save the workflow.
  12. Go to Slack and post a message “Try API” in the channel. slack_message
  13. The slack trigger keeps listening to 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 webMethods.io flow. webmethods.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 webMethods.io flow according to the requirement.

Next steps

Would you like to send some message to Slack channel when some operations are carried out in 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)

Read full topic

Top comments (0)