# How to send rasa events tracker data to api not database?

**URL:** <https://forum.rasa.com/t/how-to-send-rasa-events-tracker-data-to-api-not-database/50579>\
**Category:** Rasa Open Source\
**Created:** [January 14, 2022, 4:26am UTC](https://forum.rasa.com/t/how-to-send-rasa-events-tracker-data-to-api-not-database/50579 "2022-01-14T04:26:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hanifabd](https://avatars.discourse-cdn.com/v4/letter/h/f14d63/32.png) [@hanifabd](https://forum.rasa.com/u/hanifabd)\
**Post date:** [January 14, 2022, 4:26am UTC](https://forum.rasa.com/t/how-to-send-rasa-events-tracker-data-to-api-not-database/50579/1 "2022-01-14T04:26:44Z")

</div>

hi, anybody here ever make custom `tracker_store.py` that send the events to an api? need help i am exploring on this part but got stucked

in case, i want to save the events rasa tracker in my custom api with flask. i dont want to save it directly from rasa tracker store feature. how to send the events data from rasa tracker store to my custom flask endpoint?

thanks

---

<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:** [January 14, 2022, 12:28pm UTC](https://forum.rasa.com/t/how-to-send-rasa-events-tracker-data-to-api-not-database/50579/2 "2022-01-14T12:28:12Z")

</div>

@hanifabd Why do you want to use the tracker\_store for your use case, I hope you are aware of why we use the tracker store?

@hanifabd you can directly send the API request from the chatbot or user queries and get the instant response using custom action and for storing the conversation of bot/user then you use tracker store.

@hanifabd

> [@hanifabd](#):
>
> in case, i want to save the events rasa tracker in my custom api with flask. i dont want to save it directly from rasa tracker store feature. how to send the events data from rasa tracker store to my custom flask endpoint?

I didn’t get it can you please share some examples or code in this context OR that you have developed your own API (custom) and want to send the API request from the rasa? Give us more detail please.

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [January 15, 2022, 2:57am UTC](https://forum.rasa.com/t/how-to-send-rasa-events-tracker-data-to-api-not-database/50579/3 "2022-01-15T02:57:25Z")

</div>

You can either create a custom tracker store (discussed [here](https://rasa.com/docs/rasa/tracker-stores/#custom-tracker-store)) or you could look at an existing (Rabbit or Kafka) or custom [event broker](https://rasa.com/docs/rasa/event-brokers/).

---

<div class="post-metadata">

**Author:** ![hanifabd](https://avatars.discourse-cdn.com/v4/letter/h/f14d63/32.png) [@hanifabd](https://forum.rasa.com/u/hanifabd)\
**Post date:** [January 15, 2022, 10:25am UTC](https://forum.rasa.com/t/how-to-send-rasa-events-tracker-data-to-api-not-database/50579/4 "2022-01-15T10:25:46Z")

</div>

Hi, basicly i want to make my own tracker saver using flask. not using tracker\_store feature by rasa, and actually i have tackled this issue by using this rasa endpoints: (GET) `http://localhost:5005/conversations/"+ sender_id +"/tracker"` to stream the bot activity history. thanks a lot.

i didnt use tracker\_store.py finally and done this issues all in flask directly by using that endpoint

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [January 15, 2022, 6:21pm UTC](https://forum.rasa.com/t/how-to-send-rasa-events-tracker-data-to-api-not-database/50579/5 "2022-01-15T18:21:50Z")

</div>

So, you’re polling that endpoint at some interval?

---

<div class="post-metadata">

**Author:** ![hanifabd](https://avatars.discourse-cdn.com/v4/letter/h/f14d63/32.png) [@hanifabd](https://forum.rasa.com/u/hanifabd)\
**Post date:** [January 18, 2022, 3:22pm UTC](https://forum.rasa.com/t/how-to-send-rasa-events-tracker-data-to-api-not-database/50579/6 "2022-01-18T15:22:01Z")

</div>

basicly, i create a custom endpoints for rasa rest webhook using flask. I send message through that flask apps. Parallely i get its current time execution (EVENT\_START) when the message sent to the webhook and also sent GET request to `http://localhost:5005/conversations/"+ sender_id +"/tracker"` to get the chatbot events history. its quite tricky to append only the newest events and make sure no duplication when inserting to db. to tackle that problem i use EVENT\_START (that i define before) and get LATEST\_EVENT\_TIME that available in tracker data json. I use that 2 parameters (EVENT\_START and LATEST\_EVENT\_TIME) to get the newest event and then send to db

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [January 18, 2022, 10:20pm UTC](https://forum.rasa.com/t/how-to-send-rasa-events-tracker-data-to-api-not-database/50579/7 "2022-01-18T22:20:39Z")

</div>

If you bring up the rabbit container you wouldn’t have to poll and filter events by date. Just subscribe to the event queue.

---

<div class="post-metadata">

**Author:** ![hanifabd](https://avatars.discourse-cdn.com/v4/letter/h/f14d63/32.png) [@hanifabd](https://forum.rasa.com/u/hanifabd)\
**Post date:** [January 19, 2022, 1:15am UTC](https://forum.rasa.com/t/how-to-send-rasa-events-tracker-data-to-api-not-database/50579/8 "2022-01-19T01:15:28Z")

</div>

could you share the repo or some documentation about it? thank you
