# Intergrate rasa with mattermost

**URL:** <https://forum.rasa.com/t/intergrate-rasa-with-mattermost/21908>\
**Category:** Rasa Open Source\
**Created:** [November 30, 2019, 4:51pm UTC](https://forum.rasa.com/t/intergrate-rasa-with-mattermost/21908 "2019-11-30T16:51:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vuhoa199x](https://avatars.discourse-cdn.com/v4/letter/v/9d8465/32.png) [@vuhoa199x](https://forum.rasa.com/u/vuhoa199x)\
**Post date:** [November 30, 2019, 4:51pm UTC](https://forum.rasa.com/t/intergrate-rasa-with-mattermost/21908/1 "2019-11-30T16:51:51Z")

</div>

Hi everyone. I have some issue when trying to connect my rasa chatbot with mattermost.   
I build both mattermost and rasa in local. But when i follow the tutorial [Mattermost](https://rasa.com/docs/rasa/user-guide/connectors/mattermost/) it’s not clear. Can you help me to do this.   
thank you.  
This is my setting

 ![Screenshot%20from%202019-11-30%2023-16-59](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/f/f73e3f8fefd4ed4e46c954b47655d62df54d63fe.png) ![Screenshot%20from%202019-11-30%2023-44-22](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/0/0b2e77c71b088ed13c5d4ddd48cb91071f63e9a2.png)

---

<div class="post-metadata">

**Author:** ![imLew](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/imlew/32/3744_2.png) [@imLew](https://forum.rasa.com/u/imLew)\
**Post date:** [December 3, 2019, 10:03am UTC](https://forum.rasa.com/t/intergrate-rasa-with-mattermost/21908/2 "2019-12-03T10:03:11Z")

</div>

What exactly is not clear? Are you running the rasa server? Try running it with `--debug` and check the output.

---

<div class="post-metadata">

**Author:** ![andzejsp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/andzejsp/32/14818_2.png) [@andzejsp](https://forum.rasa.com/u/andzejsp)\
**Post date:** [May 7, 2021, 12:08pm UTC](https://forum.rasa.com/t/intergrate-rasa-with-mattermost/21908/3 "2021-05-07T12:08:38Z")

</div>

Have you figured it out?

---

<div class="post-metadata">

**Author:** ![vuhoa199x](https://avatars.discourse-cdn.com/v4/letter/v/9d8465/32.png) [@vuhoa199x](https://forum.rasa.com/u/vuhoa199x)\
**Post date:** [May 7, 2021, 12:25pm UTC](https://forum.rasa.com/t/intergrate-rasa-with-mattermost/21908/4 "2021-05-07T12:25:53Z")

</div>

Yes. I relize the ip of mattermost deploy to docker is wrong. I have to go deeper to find the ip and then everything is ok

---

<div class="post-metadata">

**Author:** ![andzejsp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/andzejsp/32/14818_2.png) [@andzejsp](https://forum.rasa.com/u/andzejsp)\
**Post date:** [May 7, 2021, 2:05pm UTC](https://forum.rasa.com/t/intergrate-rasa-with-mattermost/21908/5 "2021-05-07T14:05:02Z")

</div>

Can you explain to me your credentials.yml file setting… the

```auto
mattermost:
  url: is mattemost api url right?
  username: is bot username not email?
  pw: is bot token? or i need to make fake user account to use here?
  webhook_url: is rasa url? like if im using rasa x then i put rasa x ip and port?

rasa:
  url: why is this port different than the one from webhook??

```

Also the rasa documentation says that i need to configure mattermost outgoing webhook with rasa x api url? but cant i use just bot token?

EDIT: I finally made it work… Needed to `ufw allow 5005` and then do this

```auto
mattermost:
  url: "http://mattermost server/api/v4"
  token: "bot token not token ID"
  webhook_url: "http://rasa x server:5005/webhooks/mattermost/webhook" # and this has to be set up in mattermost integrations as outgoing webhook and (Callback URLs (One Per Line)) must match the rasa x ip but the port has to be for some unknown reason 5005 not 5002

```

EDIT 2: if i turn off debug for rasa x server then i get this every time i message my bot

```auto
2021-05-07 17:29:51 ERROR rasa.core.channels.mattermost - Failed to send message to mattermost channel gh4n76cda3bg8gmryi5ihr6b9y. Response: <Response [201]>
2021-05-07 17:30:06 ERROR rasa.core.channels.mattermost - Failed to send message to mattermost channel gh4n76cda3bg8gmryi5ihr6b9y. Response: <Response [201]>
2021-05-07 17:30:06 ERROR rasa.core.channels.mattermost - Failed to send message to mattermost channel gh4n76cda3bg8gmryi5ihr6b9y. Response: <Response [201]>
2021-05-07 17:30:06 ERROR rasa.core.channels.mattermost - Failed to send message to mattermost channel gh4n76cda3bg8gmryi5ihr6b9y. Response: <Response [201]>
2021-05-07 17:30:23 ERROR rasa.core.channels.mattermost - Failed to send message to mattermost channel gh4n76cda3bg8gmryi5ihr6b9y. Response: <Response [201]>

```

Bot responds to my querries but im not sure why im getting this error

---

<div class="post-metadata">

**Author:** ![findAkash](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/findakash/32/22400_2.png) [@findAkash](https://forum.rasa.com/u/findAkash)\
**Post date:** [June 8, 2023, 7:47am UTC](https://forum.rasa.com/t/intergrate-rasa-with-mattermost/21908/6 "2023-06-08T07:47:14Z")

</div>

Can anyone help me to intenerate mattermost with rasa

tried

1. added this to my crediantials.yaml file mattermost: url: “[http://localhost:8065/api/v4](http://localhost:8065/api/v4)” token: “dajx3cuyp7bwf8648d1zatzpm” “this is the access token of bot” webhook\_url: “[http://localhost:5005/webhooks/rest/webhook](http://localhost:5005/webhooks/rest/webhook)”

but while mentioning the bot in my mattermost , it does not trigger to the rasa server.

---

<div class="post-metadata">

**Author:** ![findAkash](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/findakash/32/22400_2.png) [@findAkash](https://forum.rasa.com/u/findAkash)\
**Post date:** [June 11, 2023, 1:57am UTC](https://forum.rasa.com/t/intergrate-rasa-with-mattermost/21908/7 "2023-06-11T01:57:51Z")

</div>

Resolved it. Successfully connected my rasa AI with the Mattermost Bot.
