Invoke webMethods Developer Portal REST APIs by posting a message in Slack channel
Tags: rest, api, slack, tutorial
Published: 2022-10-07 08:11:46

---
title: Invoke webMethods Developer Portal REST APIs by posting a message in Slack channel
published: true
date: 2022-08-25 03:54:36 UTC
tags: rest, api, slack, tutorial
canonical_url: https://tech.forums.softwareag.com/t/invoke-webmethods-developer-portal-rest-apis-by-posting-a-message-in-slack-channel/260589
---

 

## 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**](http://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.io**](http://webmethods.io/)Integration 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](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/3/6/36b1714e777c178ccfcd132cb3e089cba13cea83_2_1035x510.png)
4. Select the archive file “InvokeAPI\_DevPortalFromSlack.zip” shared in the article.
5. The workflow name and description are preloaded.
![workflow_settings](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/7/4/74101d77957ade51f77391140dcfdc1290faad3f_2_1035x505.png)
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](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/e/0/e0c586338b43e9a29132ae94f427ec0dc6d2d7de_2_1035x505.png)
10. Provide mandatory inputs and select the required HTTP method, URL, Headers, Authentication and body.
![http_action](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/7/d/7d1a72fd112ce5775f95a4aee814009a188ce278_2_1035x507.png)
![http_action2](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/f/6/f6fe4c0aa719dc0229015b368b57396ad1ac7bc4_2_1035x508.png)
11. Click Next and save the workflow.
12. Go to Slack and post a message “Try API” in the channel.
![slack_message](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/e/c/ec1dfc6688e256fdaed5d01c0e40e8de9799dca3_2_1035x639.png)
13. The slack trigger keeps listening to Slack channel and when a message is posted in Slack channel, the [webMethods.io](http://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](http://webmethods.io) flow.
![webmethods.io_flow](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/6/b/6bb70107ddf8746bf40533d3286886832970ab99_2_1035x519.png)
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](https://tech.forums.softwareag.com/t/post-message-in-slack-channel-for-operation-in-developer-portal/260586) 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](http://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](https://tech.forums.softwareag.com/t/post-message-in-slack-channel-for-operation-in-developer-portal/260586)

## Useful links | Relevant resources

[InvokeAPI\_DevPortalFromSlack.zip](https://tech.forums.softwareag.com/uploads/short-url/dslxEdlUApZ9pVDT9d66z9pooMt.zip) (39.5 KB)

[Read full topic](https://tech.forums.softwareag.com/t/invoke-webmethods-developer-portal-rest-apis-by-posting-a-message-in-slack-channel/260589)