# How to respond to message shortcut in slack from postman?

**URL:** <https://community.postman.com/t/how-to-respond-to-message-shortcut-in-slack-from-postman/19465>\
**Category:** Help Hub\
**Tags:** mockservers\
**Created:** [January 23, 2021, 9:03am UTC](https://community.postman.com/t/how-to-respond-to-message-shortcut-in-slack-from-postman/19465 "2021-01-23T09:03:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![thefierycoder](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@thefierycoder](https://community.postman.com/u/thefierycoder)\
**Post date:** [January 23, 2021, 9:03am UTC](https://community.postman.com/t/how-to-respond-to-message-shortcut-in-slack-from-postman/19465/1 "2021-01-23T09:03:50Z")

</div>

> **Archived topic — some details may be out of date.**  
> Mock servers built from saved collection examples are still supported. Postman now also has **code-based mocks** : JavaScript request handlers plus a `config.yaml`, stored as files in your Git repository, which you can run locally or deploy. Create one in the app, or use the Postman CLI to generate one from an OpenAPI spec, collection or dataset (`postman mock generate`) and run it (`postman mock run`). See [About mocks](https://learning.postman.com/docs/design-apis/mock-apis/mocks/overview) and [Create a mock](https://learning.postman.com/docs/design-apis/mock-apis/mocks/create-a-mock).  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) can build and run mocks for you.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

I am working on a collection I want know when user trigger the message shortcut in slack it post the payload to the postman webhook url(that I already created), after that my app should respond with an HTTP status `200 OK` within 3000ms of receiving the payload.  
I don’t know how to respon with HTTP status 200 OK, i know we can send data back to slack using response\_url(that we received from the payload).  
I know this can be possible using mock server but I can’t able to figure how to do that?  
Please anyone help me with this issue.  
I really need your help.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [January 23, 2021, 10:42am UTC](https://community.postman.com/t/how-to-respond-to-message-shortcut-in-slack-from-postman/19465/2 "2021-01-23T10:42:08Z")

</div>

What have you tried so far?

What does your set up look like?

Where have you see this working with a mock server to know that it’s possible?

Please expand on the details of the question and provide more context and examples to bring the information to life.

The more detail you add to the question, the higher change that someone will be able to help you reach a solution.

---

<div class="post-metadata">

**Author:** ![thefierycoder](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@thefierycoder](https://community.postman.com/u/thefierycoder)\
**Post date:** [January 23, 2021, 10:47am UTC](https://community.postman.com/t/how-to-respond-to-message-shortcut-in-slack-from-postman/19465/3 "2021-01-23T10:47:59Z")

</div>

This is how my setup look like

 ![Screenshot from 2021-01-23 15-56-38](https://us1.discourse-cdn.com/getpostman/original/3X/6/5/65bd23ad91f6be22fd54e1ed3921dca21608b7a7.png) ![Screenshot from 2021-01-23 15-56-53](https://us1.discourse-cdn.com/getpostman/original/3X/9/7/97299d28616ffcedaf55ac6eab4acc6327b873ec.png) ![Screenshot from 2021-01-23 15-57-05](https://us1.discourse-cdn.com/getpostman/original/3X/5/9/5905591dc46f8240850cc6cbf59ebb0266360151.png)  
This is where I see:  
[https://www.postman.com/kwkrxd/workspace/postcards/](https://www.postman.com/kwkrxd/workspace/postcards/)  
[https://www.postman.com/solar-resonance-98165/workspace/crypto-trader-alert/collection/3764043-d3ed7317-9904-4261-8b3e-f5e6617633b7?ctx=documentation](https://www.postman.com/solar-resonance-98165/workspace/crypto-trader-alert/collection/3764043-d3ed7317-9904-4261-8b3e-f5e6617633b7?ctx=documentation)  
My collection run perfectly fine but when I trigger the message shortcut, it shows me this error message on slack  
 ![Screenshot from 2021-01-21 19-49-58](https://us1.discourse-cdn.com/getpostman/original/3X/1/5/15a4f92d4484169c84fc3d130166062e9bc2311c.png)  
I already setup my postman webhook url in the slack app management.  
Could you please help me to fix this?

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [January 23, 2021, 11:43am UTC](https://community.postman.com/t/how-to-respond-to-message-shortcut-in-slack-from-postman/19465/4 "2021-01-23T11:43:42Z")

</div>

I’m not at my machine to even try this out but the request body would need to be in the format/structure to what the Slack API expects to receive.

I don’t _think_ that you can add any old body in there because it’s going to be formulating a Slack message from it and I expect a certain structure is required.

This is taken from there docs:

```auto
{
  "type": "section",
  "text": {
    "type": "mrkdwn",
    "text": "A message *with some bold text* and _some italicized text_."
  }
}

```

> **[Building blocks](https://api.slack.com/block-kit/building)**
>
> String the atoms together into molecules and inject them into messages and modals.

When I have tried this in the past, the URL on the request would something like this:

```auto
https://hooks.slack.com/services/<id>

```

And you add the Postman generated webhook URL to the Slack side.

---

<div class="post-metadata">

**Author:** ![thefierycoder](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@thefierycoder](https://community.postman.com/u/thefierycoder)\
**Post date:** [January 23, 2021, 1:00pm UTC](https://community.postman.com/t/how-to-respond-to-message-shortcut-in-slack-from-postman/19465/5 "2021-01-23T13:00:16Z")

</div>

Thanks for your response  
Now, I did like this as you said

 ![Screenshot from 2021-01-23 18-32-57](https://us1.discourse-cdn.com/getpostman/original/3X/a/a/aa6f04fd0ea00ea22617986a6d7f2678150a7529.png)  
 ![Screenshot from 2021-01-23 18-31-16](https://us1.discourse-cdn.com/getpostman/original/3X/5/7/579bdec426999920cee96136ed1645bfd0ef65d1.png)  
But when I trigger the message shortcut from the slack, it says **sorry that didn’t work**  
This is how I setup the postman webhook  
 ![Screenshot from 2021-01-23 18-27-59](https://us1.discourse-cdn.com/getpostman/original/3X/c/0/c0c1a6a0a51f20263a9f282ba6eae95c6098e186.png)  
But everytime I trigger the message shortcut, it shows me an error, but the collection run perfectly fine and send the message back to slack what I saved in the body and I didn’t see any error on monitors console.  
Do you have any idea how to fix that?

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [January 23, 2021, 1:15pm UTC](https://community.postman.com/t/how-to-respond-to-message-shortcut-in-slack-from-postman/19465/6 "2021-01-23T13:15:09Z")

</div>

I don’t know what else you’re doing or have in front of you so all I’m offering is guess work. 😁

I didn’t use that Slack option previously, I used the Slash Command option and added my Postman webhook there once I went through the guide.

> **[Enabling interactivity with Slash Commands](https://api.slack.com/interactivity/slash-commands)**
>
> Learn how to build bot users, send notifications, and interact with workspaces using our APIs.

If you’re using a different option, there should be plenty of documents available to you, created by Slack, to help with getting that working.

---

<div class="post-metadata">

**Author:** ![thefierycoder](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@thefierycoder](https://community.postman.com/u/thefierycoder)\
**Post date:** [January 23, 2021, 1:34pm UTC](https://community.postman.com/t/how-to-respond-to-message-shortcut-in-slack-from-postman/19465/7 "2021-01-23T13:34:01Z")

</div>

I tried to find but I can’t able to figure out how to remove that error.  
I know How to work with slash commands but I want to use message shortcut.
