# Rasa deployment to Google chat

**URL:** <https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103>\
**Category:** Rasa Open Source\
**Created:** [August 22, 2021, 3:12am UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103 "2021-08-22T03:12:44Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![seymanur](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@seymanur](https://forum.rasa.com/u/seymanur)\
**Post date:** [August 22, 2021, 3:12am UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/1 "2021-08-22T03:12:44Z")

</div>

Hi, members of Rasa! I developed a Rasa chatbot for my project and deployed it to Google Chat. I want to store and see the conversations between the bot and user (I say “see” because even though InMemoryTrackerStore is the default one, I don’t understand where it stores the data). I am trying to use the tracker stores [Tracker Stores](https://rasa.com/docs/rasa/tracker-stores) for Google chat but I fail. If you can provide any solution or help it would be greatly appreciated! Thank you for your help in advance!

---

<div class="post-metadata">

**Author:** ![sreewarrier](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@sreewarrier](https://forum.rasa.com/u/sreewarrier)\
**Post date:** [August 22, 2021, 4:55am UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/2 "2021-08-22T04:55:33Z")

</div>

You may store the data in tracker store to a DB, so that you can see anytime later

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [August 22, 2021, 7:17am UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/3 "2021-08-22T07:17:21Z")

</div>

Hello,

> [@seymanur](#):
>
> I am trying to use the tracker stores [Tracker Stores](https://rasa.com/docs/rasa/tracker-stores) for Google chat but I fail.

What did you try?

This is a sample configuration for an SQL Tracker Store:

```auto
tracker_store:
    type: SQL
    dialect: "mysql"
    url: "localhost"
    db: "rasa_tracker_store"
    username: "rasa"
    password: "rasa"

```

---

<div class="post-metadata">

**Author:** ![seymanur](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@seymanur](https://forum.rasa.com/u/seymanur)\
**Post date:** [August 23, 2021, 12:18am UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/4 "2021-08-23T00:18:43Z")

</div>

Hi @ChrisRahme. Thanks for your answer. This is what I used:

tracker\_store: type: SQL dialect: “sqlite” url: “sqlite:///./Chat.db” db: “Chat.db” username: # username used for authentication password: # password used for authentication query: # optional driver: my-driver

After this, there is a db file created. But it seems a mess and it is impossible to see the conversation as it included everything. Here is how it looks.

```
?a'ÇwSeyma N. Yildirim ErbasliactionAÿHπB”é;action_listen{"event": "action", "timestamp": 1629676811.305556, "name": "action_listen", "policy": "policy_0_MemoizationPolicy", "confidence": 1.0, "action_text": null, "hide_rule_turn": false}Ç ?aÉqSeyma N. Yildirim ErbaslibotAÿHπB”{"event": "bot", "timestamp": 1629676811.2985191, "metadata": {"utter_action": "utter_greet"}, "text": "Hey! How are you?", "data": {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}}Ån	?a#ÇsSeyma N. Yildirim ErbasliactionAÿHπB”7utter_greet{"event": "action", "timestamp": 1629676811.298475, "name": "utter_greet", "policy": "policy_0_MemoizationPolicy", "confidence": 1.0, "action_text": null, "hide_rule_turn": false}Å a	?1aÅUSeyma N. Yildirim Erbasliuser_featurizationAÿHπB”“{"event": "user_featurization", "timestamp": 1629676811.298451, "use_text_for_featurization": false}ä(	?aìwSeyma N. Yildirim ErbasliuserAÿHπB≤ˇ±greet{"event": "user", "timestamp": 1629676810.7968562, "metadata": {"room": null}, "text": "hi", "parse_data": {"intent": {"id": 1865928600676492346, "name": "greet", "confidence": 0.999992847442627}, "entities": [], "text": "hi", "message_id": "00a8b5d2d8234a9ba4b787a0944b4996", "metadata": {"room": null}, "intent_ranking": [{"id": 1865928600676492346, "name": "greet", "confidence": 0.999992847442627}, {"id": 8589213380093636930, "name": "bot_challenge", "confidence": 3.928860223822994e-06}, {"id": -8115760450847392978, "name": "deny", "confidence": 1.334612875325547e-06}, {"id": -4569718716967379854, "name": "affirm", "confidence": 9.102215585699014e-07}, {"id": -8744173899695903939, "name": "goodbye", "confidence": 8.074327979556983e-07}, {"id": 6186387067587524339, "name": "mood_unhappy", "confidence": 1.2777123004070745e-07}, {"id": 1966283807190876054, "name": "mood_great", "confidence": 7.397377288498319e-08}], "response_selector": {"all_retrieval_intents": [], "default": {"response": {"id": null, "responses": null, "response_templates": null, "confidence": 0.0, "intent_response_key": null, "utter_action": "utter_None", "template_name": "utter_None"}, "ranking": []}}}, "input_channel": "hangouts", "message_id": "00a8b5d2d8234a9ba4b787a0944b4996"}Å[	?a'ÇISeyma N. Yildirim ErbasliactionAÿHπBèF™action_listen{"event": "action", "timestamp": 1629676810.238688, "name": "action_listen", "policy": null, "confidence": null, "action_text": null, "hide_rule_turn": false}Å4	?a=ÅiSeyma N. Yildirim ErbaslislotAÿHπBèFosession_started_metadata{"event": "slot", "timestamp": 1629676810.238674, "name": "session_started_metadata", "value": {"room": null}}Å	?+aÅ?Seyma N. Yildirim Erbaslisession_startedAÿHπBèDÆ{"event": "session_started", "timestamp": 1629676810.2385669, "metadata": {"room": null}}Åh	?a5ÇUSeyma N. Yildirim ErbasliactionAÿHπBèAˇaction_session_start{"event": "action", "timestamp": 1629676810.238403, "name": "action_session_start", "policy": null, "confidence": 1.0, "action_text": null, "hide_rule_turn": false}Å4	?a=ÅiSeyma N. Yildirim ErbaslislotAÿHπBè/session_started_metadata{"event": "slot", "timestamp": 1629676810.237251, "name": "session_started_metadata", "value": {"room": null}}

```

…

and so on.

But I only want to see the conversation. Hope you can help.

---

<div class="post-metadata">

**Author:** ![seymanur](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@seymanur](https://forum.rasa.com/u/seymanur)\
**Post date:** [August 23, 2021, 12:20am UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/5 "2021-08-23T00:20:15Z")

</div>

Hi @sreewarrier. Thanks for your answer. I am already trying the tracker store. But the stored conversation is a mess. It includes everything (probabilities, names, etc). But I only want to see the conversation. Here is how it looks:

```
?a'ÇwSeyma N. Yildirim ErbasliactionAÿHπB”é;action_listen{"event": "action", "timestamp": 1629676811.305556, "name": "action_listen", "policy": "policy_0_MemoizationPolicy", "confidence": 1.0, "action_text": null, "hide_rule_turn": false}Ç ?aÉqSeyma N. Yildirim ErbaslibotAÿHπB”{"event": "bot", "timestamp": 1629676811.2985191, "metadata": {"utter_action": "utter_greet"}, "text": "Hey! How are you?", "data": {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}}Ån	?a#ÇsSeyma N. Yildirim ErbasliactionAÿHπB”7utter_greet{"event": "action", "timestamp": 1629676811.298475, "name": "utter_greet", "policy": "policy_0_MemoizationPolicy", "confidence": 1.0, "action_text": null, "hide_rule_turn": false}Å a	?1aÅUSeyma N. Yildirim Erbasliuser_featurizationAÿHπB”“{"event": "user_featurization", "timestamp": 1629676811.298451, "use_text_for_featurization": false}ä(	?aìwSeyma N. Yildirim ErbasliuserAÿHπB≤ˇ±greet{"event": "user", "timestamp": 1629676810.7968562, "metadata": {"room": null}, "text": "hi", "parse_data": {"intent": {"id": 1865928600676492346, "name": "greet", "confidence": 0.999992847442627}, "entities": [], "text": "hi", "message_id": "00a8b5d2d8234a9ba4b787a0944b4996", "metadata": {"room": null}, "intent_ranking": [{"id": 1865928600676492346, "name": "greet", "confidence": 0.999992847442627}, {"id": 8589213380093636930, "name": "bot_challenge", "confidence": 3.928860223822994e-06}, {"id": -8115760450847392978, "name": "deny", "confidence": 1.334612875325547e-06}, {"id": -4569718716967379854, "name": "affirm", "confidence": 9.102215585699014e-07}, {"id": -8744173899695903939, "name": "goodbye", "confidence": 8.074327979556983e-07}, {"id": 6186387067587524339, "name": "mood_unhappy", "confidence": 1.2777123004070745e-07}, {"id": 1966283807190876054, "name": "mood_great", "confidence": 7.397377288498319e-08}], "response_selector": {"all_retrieval_intents": [], "default": {"response": {"id": null,

```

… and so on

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [August 23, 2021, 8:42am UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/6 "2021-08-23T08:42:48Z")

</div>

@seymanur Hey! What is your rasa version and you planning to use which database is it MySQL or Postgres etc

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [August 23, 2021, 9:13am UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/7 "2021-08-23T09:13:27Z")

</div>

Can you try to set `url` as the full path instead of `sqlite:///./Chat.db`?

This is how the database looks by the way:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/f/7/f73f134f474552304c3fa1e8f9b75fca1edd822c.png)

---

<div class="post-metadata">

**Author:** ![seymanur](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@seymanur](https://forum.rasa.com/u/seymanur)\
**Post date:** [August 23, 2021, 5:13pm UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/8 "2021-08-23T17:13:55Z")

</div>

Thanks @ChrisRahme. It did not make a difference. Thank you for sharing how it looks. Actually for me, this is not how I see it. I am a Mac user and work on terminal. Here are the screenshots of the folder I create including the Chat.db. I can open the Chat.db file using TextEdit only.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/e/b/eb33a3772bc85ccd922e2f46646838bc60298a8b.jpeg) ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/e/3/e37f1ef2bed8dd98bc7589a4a0f6a91ccc6a0644.png)

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [August 23, 2021, 5:18pm UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/9 "2021-08-23T17:18:07Z")

</div>

Yes sorry, the picture I shared is how the database will appear in MySQL, not in the `.db` file.

As for why it doesn’t work… I don’t know to be honest. Try writing a small Python script to test the connection with this URL and see if it works.

---

<div class="post-metadata">

**Author:** ![seymanur](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@seymanur](https://forum.rasa.com/u/seymanur)\
**Post date:** [August 23, 2021, 5:26pm UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/10 "2021-08-23T17:26:22Z")

</div>

Thank you! Can I also register and see db in MySQL? At least, it seems more organized. Can I ask whether under data column, you see the entire conversation for each user or a new row created for each entry?

Best!

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [August 23, 2021, 5:30pm UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/11 "2021-08-23T17:30:33Z")

</div>

Yes, this is the configuration for MySQL, simpler than SQLite 🙂

> [@ChrisRahme](#):
>
> ```auto
> tracker_store:
> type: SQL
> dialect: "mysql"
> url: "localhost"
> db: "rasa_tracker_store"
> username: "rasa"
> password: "rasa"
> 
> ```

In the `data` column you can just see info about 1 message.

---

<div class="post-metadata">

**Author:** ![seymanur](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@seymanur](https://forum.rasa.com/u/seymanur)\
**Post date:** [August 23, 2021, 5:33pm UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/12 "2021-08-23T17:33:25Z")

</div>

Thanks a lot for all your help and time! I will try it right away, finger crossed 🙂

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [August 23, 2021, 7:56pm UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/13 "2021-08-23T19:56:27Z")

</div>

@seymanur you just want to store the the bot/user conversation in any database ?

For storing the bot/user conversation you can use tracker store:

Update this code in **endpoints.yml**

**For Postgres:**

```
tracker_store:
   type: SQL
   dialect: "postgresql" # the dialect used to interact with the db
   url: "localhost" # (optional) host of the sql db, e.g. "localhost"
   db: "chatbot" # path to your db
   username: "postgres" # username used for authentication
   password: "123" # password used for authentication
   # query: # optional dictionary to be added as a query string to the connection URL
   # driver: my-driver

```

**For MySQL:**

```
tracker_store:
   type: SQL
   dialect: "mysql+pymysql" # the dialect used to interact with the db
   url: "localhost" # (optional) host of the sql db, e.g. "localhost"
   db: "rasa" # path to your db
   username: "root" # username used for authentication
   password: "root" # password used for authentication

```

**Note:** You also can need to install psycopg2-binary and pymysql. You will see when it will thrown error.

@seymanur You need to create a database schema i.e rasa (or whatever you feel like) and update same in `db: rasa`, train the bot and run rasa and rasa actions in separate terminals; whilst running you will get above mention errors or some other please install in your conda environment and again train and follow the process.

Good Luck!

---

<div class="post-metadata">

**Author:** ![seymanur](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@seymanur](https://forum.rasa.com/u/seymanur)\
**Post date:** [August 24, 2021, 3:14pm UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/14 "2021-08-24T15:14:03Z")

</div>

Hi! Thank you for the detailed instructions! Now, I am able to store the conversations and see them properly. Many thanks again!

Best!

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [August 24, 2021, 3:20pm UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/15 "2021-08-24T15:20:12Z")

</div>

@seymanur Great! please close this thread with the solution for others and good luck with your project!

---

<div class="post-metadata">

**Author:** ![seymanur](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@seymanur](https://forum.rasa.com/u/seymanur)\
**Post date:** [September 28, 2021, 7:41pm UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/16 "2021-09-28T19:41:26Z")

</div>

Here are the steps I followed:

In the credentials.yml

1- hangouts: no credentials required here 2- Create project in google cloud 3- Select Go to APIs overview. 4- On the grid click Hangouts Chat API 5- Click Configuration 6- Bot url should be: https://.ngrok.io/webhooks/hangouts/webhook

In the endpoints.yml tracker\_store:

```
 type: SQL
 dialect: "sqlite" # the dialect used to interact with the db
 url: "sqlite:///./Chat.db"
 db: "Chat.db" # path to your db
 username: # username used for authentication
 password: # password used for authentication
 query: # optional dictionary to be added as a query string to the connection URL
 driver: my-driver

```

2- Open a new terminal (if you are a Mac user) and run sqlite3 3- run sqlite Chat.db

---

<div class="post-metadata">

**Author:** ![Vedha27](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/vedha27/32/15355_2.png) [@Vedha27](https://forum.rasa.com/u/Vedha27)\
**Post date:** [April 11, 2022, 4:34am UTC](https://forum.rasa.com/t/rasa-deployment-to-google-chat/47103/17 "2022-04-11T04:34:20Z")

</div>

Have you used any python code for this to configure databases?
