# Run an action in a conversation HTTP API not displayed in web chat

**URL:** <https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106>\
**Category:** Rasa Open Source\
**Created:** [August 8, 2019, 2:51pm UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106 "2019-08-08T14:51:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohocp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mohocp/32/4522_2.png) [@mohocp](https://forum.rasa.com/u/mohocp)\
**Post date:** [August 8, 2019, 2:51pm UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/1 "2019-08-08T14:51:16Z")

</div>

Dears, I tried to run an action to active conversation using HTTP API but the message that dispatched from the action not displayed on The web chat, for debugging I run the rasa and rasa actions with Debug Command, In the terminal the action execution appeared on rasa and rasa actions just the dispatched message not displayed on the web chat.

for web chat I am using [rasa-webchat](https://github.com/mrbot-ai/rasa-webchat)

Snapshot from **HTTP API call**

Request URL: conversations/{conversationId}/execute

Request Body:

> { “name”: “action\_test\_notify” }

Snapshot from **rasa run actions -vv**

> 2019-08-08 17:39:12 DEBUG rasa\_sdk.executor - Received request to run ‘action\_test\_notify’ 2019-08-08 17:39:12 WARNING root - action\_test\_notify 2019-08-08 17:39:12 DEBUG rasa\_sdk.executor - Finished running ‘action\_test\_notify’ 127.0.0.1 - - [2019-08-08 17:39:12] “POST /webhook HTTP/1.1” 200 432 0.001520

Snapshot from **rasa run --enable-api -vv**

> 2019-08-08 17:44:24 DEBUG rasa.core.processor - Action ‘action\_test\_notify’ ended with events ‘[‘BotUttered(text: test message., data: {“elements”: null, “quick\_replies”: null, “buttons”: null, “attachment”: null, “image”: null, “custom”: null}, metadata: {})’, ‘BotUttered(text: pushed message, data: {“elements”: null, “quick\_replies”: null, “buttons”: null, “attachment”: null, “image”: null, “custom”: null}, metadata: {})’]’ 2019-08-08 17:44:24 DEBUG rasa.core.processor - Current slot values: able\_to\_finish: None finish\_date: None is\_remain\_tasks: None project\_name: None requested\_slot: None 2019-08-08 17:44:24 DEBUG rasa.core.tracker\_store - Recreating tracker for id ‘id here’

any help please to overcome this issue.

Thanks

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [August 9, 2019, 4:25pm UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/2 "2019-08-09T16:25:40Z")

</div>

Can I ask why you are using the `conversations/{conversationId}/execute` endpoint? If you are using `rasa-webchat` you should have it set up in a `socketio` input channel.

---

<div class="post-metadata">

**Author:** ![mohocp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mohocp/32/4522_2.png) [@mohocp](https://forum.rasa.com/u/mohocp)\
**Post date:** [August 9, 2019, 4:56pm UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/4 "2019-08-09T16:56:15Z")

</div>

Thanks for reply @erohmensing, I’m using socketio as input channel in webchat, but I have some scenario to run an action remotely not using python actions or stories

Thanks

---

<div class="post-metadata">

**Author:** ![mmm3bbb](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@mmm3bbb](https://forum.rasa.com/u/mmm3bbb)\
**Post date:** [August 9, 2019, 10:07pm UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/5 "2019-08-09T22:07:50Z")

</div>

@erohmensing Could you point us to how we can initiate a message to socketio then? It is not a supported output\_channel param for /conversations/{conversation\_id}/execute.

---

<div class="post-metadata">

**Author:** ![mohocp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mohocp/32/4522_2.png) [@mohocp](https://forum.rasa.com/u/mohocp)\
**Post date:** [August 9, 2019, 10:25pm UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/6 "2019-08-09T22:25:25Z")

</div>

Thanks @mmm3bbb for reply, In this way I initiate the socketio

> ```
> <script>
> WebChat.default.init({
> selector: "#webchat",
> initPayload: "/get_started",
> interval: 1000, // 1000 ms between each message
> customData: {"userId": "123"}, // arbitrary custom data. Stay minimal as this will be added to the socket
> socketUrl: "http://localhost:5005",
> socketPath: "/socket.io/",
> title: "BOT",
> subtitle: "Your AI assistants",
> inputTextFieldHint: "Type a message...",
> connectingText: "Waiting for server...",
> hideWhenNotConnected: true,
> fullScreenMode: false,
> profileAvatar: "https://dynl.mktgcdn.com/p/Qv_UQq8KoxM_Dc5LAP4WLkCFA30p6Ok7N32a5CEHFo0/196x186.png",
> openLauncherImage: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcStjhIQNktxSy0mJGzO-J1GbVi6-mkX7PbgUawvLaRkMwGJLNgY',
> closeLauncherImage: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcStjhIQNktxSy0mJGzO-J1GbVi6-mkX7PbgUawvLaRkMwGJLNgY',
> params: {
> images: {
> dims: {
> width: 300,
> height: 200,
> }
> },
> storage: "local"
> }
> })
> </script>
> 
> ```

and please note I’m using [https://github.com/mrbot-ai/rasa-webchat](https://github.com/mrbot-ai/rasa-webchat) as webchat and if that webchat is not supported as output channel for /conversations/{conversation\_id}/execute, Are there any workaround to this issue ?

Thanks

---

<div class="post-metadata">

**Author:** ![mmm3bbb](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@mmm3bbb](https://forum.rasa.com/u/mmm3bbb)\
**Post date:** [August 9, 2019, 10:28pm UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/7 "2019-08-09T22:28:10Z")

</div>

@mohocp Yeah, I was asking @erohmensing the same thing. I do have it working with Facebook Messenger (make you you upgrade to latest version).

@erohmensing… Also, I’m a little uncertain about the application flow. Let’s say that my application wants to track a stock price (stock entity) and alert user when it goes above X. Since it doesn’t appear I can pass in entities in the body, I have to save this alert info with the user, then generate a request to /conversations/{}/execute which will then find its way back to my application and I then lookup what I saved for the user, update tracker and I’m done? Oh, I guess I also need to add a magic intent that tells my application to lookup whatever queued message it has because I can’t use the normal action-handling logic that would normally act on the intent/entities/slots passed in.

Just want to make sure there’s not a more straightforward way to do this.

---

<div class="post-metadata">

**Author:** ![mohocp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mohocp/32/4522_2.png) [@mohocp](https://forum.rasa.com/u/mohocp)\
**Post date:** [August 10, 2019, 10:49pm UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/8 "2019-08-10T22:49:26Z")

</div>

@erohmensing any suggestions please ?

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [August 12, 2019, 8:59am UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/9 "2019-08-12T08:59:39Z")

</div>

@mmm3bbb If you want your bot to notify the user when an external event happens, it looks like you’re trying to do something we just added: [Actions](https://rasa.com/docs/rasa/core/actions/#proactively-reaching-out-to-the-user-using-actions)

---

<div class="post-metadata">

**Author:** ![mohocp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mohocp/32/4522_2.png) [@mohocp](https://forum.rasa.com/u/mohocp)\
**Post date:** [August 12, 2019, 10:55am UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/11 "2019-08-12T10:55:44Z")

</div>

I’m already using Action, But I run the action via HTTP API and the action executed but the dispatched message not displayed on web chat.

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [August 12, 2019, 11:23am UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/12 "2019-08-12T11:23:04Z")

</div>

Did you open the link? It’s not just a link to actions but rather to external triggers.

---

<div class="post-metadata">

**Author:** ![mohocp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mohocp/32/4522_2.png) [@mohocp](https://forum.rasa.com/u/mohocp)\
**Post date:** [August 12, 2019, 11:56am UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/13 "2019-08-12T11:56:46Z")

</div>

Thanks @erohmensing, that means the dispatched message not displayed because my input channel not supported, so I should use [CallbackInput](https://rasa.com/docs/rasa/user-guide/connectors/your-own-website/#callbackinput) channel.

So, Are there are any complete example or tutorial about how to implement CallbackInput channel ? for know I’m using socketio channel.

Thanks

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [August 12, 2019, 1:47pm UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/14 "2019-08-12T13:47:42Z")

</div>

What do you mean it is not supported? Perhaps that’s just an API spec error – messages should always get sent back to the input channel that they came from

---

<div class="post-metadata">

**Author:** ![mohocp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mohocp/32/4522_2.png) [@mohocp](https://forum.rasa.com/u/mohocp)\
**Post date:** [August 12, 2019, 2:03pm UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/15 "2019-08-12T14:03:37Z")

</div>

> Proactively reaching out to the user is dependent on the abilities of a channel and hence not supported by every channel. If your channel does not support it, consider using the [CallbackInput](https://rasa.com/docs/rasa/user-guide/connectors/your-own-website/#callbackinput) channel to send messages to a webhook.

The above is quote from the Rasa Action Documentations.

> [@erohmensing](#):
>
> Perhaps that’s just an API spec error – messages should always get sent back to the input channel that they came from

there are no error in API and message always sent to rasa console and the action executed as I mention in topic but the problem is the dispatched message not displayed on webChat

---

<div class="post-metadata">

**Author:** ![mmm3bbb](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@mmm3bbb](https://forum.rasa.com/u/mmm3bbb)\
**Post date:** [August 12, 2019, 3:54pm UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/16 "2019-08-12T15:54:13Z")

</div>

@erohmensing

I think both @mohocp and I have the same question. We are both using this endpoint:

[HTTP API](https://rasa.com/docs/rasa/api/http-api/#tag/Tracker/paths/~1conversations~1%7Bconversation_id%7D~1execute/post)

which includes query parameter output\_channel.

According to the docs, the valid values for output\_channel are: Enum: “latest” “slack” “callback” “facebook” “rocketchat” “telegram” “twilio” “webexteams”

You will see that “socketio” is _not_ a valid value.

I have tested the endpoint using Facebook Messenger as a client and using output\_channel=facebook. This indeed works - I am able to trigger an explicit action that then generates a response that is sent to the correct Messenger user.

I have also tried output\_channel=socketio and also output\_channel=latest (with correct conversation\_id for socketio client) and neither forced a response to the socketio channel. The results were returned to the http requester.

So the question that @mohocp and I (and I’m sure others) have is how do we get [http://localhost:5005/conversations/{conversation\_id}/execute](http://localhost:5005/conversations/%7Bconversation_id%7D/execute) type functionality with socketio as a channel?

---

<div class="post-metadata">

**Author:** ![mohocp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mohocp/32/4522_2.png) [@mohocp](https://forum.rasa.com/u/mohocp)\
**Post date:** [August 13, 2019, 4:09pm UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/17 "2019-08-13T16:09:14Z")

</div>

@erohmensing any help please

---

<div class="post-metadata">

**Author:** ![mohocp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mohocp/32/4522_2.png) [@mohocp](https://forum.rasa.com/u/mohocp)\
**Post date:** [August 14, 2019, 11:45am UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/18 "2019-08-14T11:45:47Z")

</div>

@akelad can please help us on this issue

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [August 14, 2019, 12:06pm UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/19 "2019-08-14T12:06:20Z")

</div>

Okay, I see. thanks for the explanation, @mmm3bbb. What I meant by

> What do you mean it is not supported? Perhaps that’s just an API spec error – messages should always get sent back to the input channel that they came from

is that maybe it’s just an error on our part where not all the supported channels are in the `enum`. @Tobias_Wochinger you added the enum of channels here – do you know if the socket channel does not support this, or if it is just something we missed?

---

<div class="post-metadata">

**Author:** ![Tobias\_Wochinger](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tobias_wochinger/32/4580_2.png) [@Tobias\_Wochinger](https://forum.rasa.com/u/Tobias_Wochinger)\
**Post date:** [August 14, 2019, 12:39pm UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/20 "2019-08-14T12:39:17Z")

</div>

Yep, socketio is not supported. If you wanna do a pr or have ideas how to do so, I’d highly appreciate it.

---

<div class="post-metadata">

**Author:** ![mohocp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mohocp/32/4522_2.png) [@mohocp](https://forum.rasa.com/u/mohocp)\
**Post date:** [August 15, 2019, 10:39am UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/21 "2019-08-15T10:39:58Z")

</div>

@Tobias_Wochinger @erohmensing @mmm3bbb,

> [@mohocp](#):
>
> If your channel does not support it, consider using the [CallbackInput](https://rasa.com/docs/rasa/user-guide/connectors/your-own-website/#callbackinput) channel to send messages to a webhook

the above quote from documentations,

Are there any explanations, tutorial or example for CallbackInput channel to send messages to webhook ?

Thanks

---

<div class="post-metadata">

**Author:** ![Tobias\_Wochinger](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tobias_wochinger/32/4580_2.png) [@Tobias\_Wochinger](https://forum.rasa.com/u/Tobias_Wochinger)\
**Post date:** [August 15, 2019, 2:27pm UTC](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106/22 "2019-08-15T14:27:20Z")

</div>

> **[Your Own Website](https://rasa.com/docs/rasa/connectors/your-own-website/)**
>
> Deploy and Run a Rasa Chat Bot on a Website

[Next page](https://forum.rasa.com/t/run-an-action-in-a-conversation-http-api-not-displayed-in-web-chat/14106.md?page=2)
