# How to MAKE SURE to get the last bot message?

**URL:** <https://forum.rasa.com/t/how-to-make-sure-to-get-the-last-bot-message/12270>\
**Category:** Rasa Open Source\
**Created:** [June 30, 2019, 1:38pm UTC](https://forum.rasa.com/t/how-to-make-sure-to-get-the-last-bot-message/12270 "2019-06-30T13:38:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ikenti](https://avatars.discourse-cdn.com/v4/letter/i/838e76/32.png) [@ikenti](https://forum.rasa.com/u/ikenti)\
**Post date:** [June 30, 2019, 1:38pm UTC](https://forum.rasa.com/t/how-to-make-sure-to-get-the-last-bot-message/12270/1 "2019-06-30T13:38:35Z")

</div>

Like other users, I 'm trying to get the last bot message. I’ve created a custom action with “tracker.events.get(‘text’)”. My problem is: depending on the situation (for example, whether there was a custom action launched just after the latest bot message or not), the event connected to the last bot message is not always at the same rank of the events. So I sometimes need a tracker.events[-7].get(‘text’) to get the latest bot message. But in other scenarios, it could be tracker.events[-6].get(‘text’) or tracker.events[-5].get(‘text’). So at the end, it is quite complicate to retrieve what the bot has just said. What are the solutions? Wouldn’t it be possible to always copy what the bot says on a special slot? And then to get the message from that slot if needed. But how to proceed? Thanks.
