I guess, the interface does not offer you a method to retrieve the latest performed custom action. The method tracker.get_last_event_for(ActionExecuted) should return the last action that was executed. But I guess that would also be action listen mostly.
You should be able to get it by implementing something like this (no guarantee that it is actually working):
def get_latest_custom_action(self) -> Optional[Text]:
for e in reversed(tracker.events):
if isinstance(e, ActionExecuted):
# TODO: as you don't want to have any action but only
# your custom actions, you should check that here
if e.action_name in ["custom-action-1"]:
return e
return None
Using inspiration for the code above I finally landed on this
for e in reversed(tracker.events):
if e[“event”] == “action”:
if e[“name”] != “action_listen”:
print(e[“name”])
which works fine for my purpose
Thanks!