How to externally send message with buttons?

Hi, I would like to know how I can inject an external event (like instructed at Reaching Out To User - External Events) that also has 2 buttons (Yes and No) attached to it.

Also, I would like to know if it is possible to trigger a custom action whenever user click on any of the 2 attached buttons, and is it possible to know:

  • The message that was sent with those 2 buttons.
  • Who clicked the buttons, on which channel
  • If user changes their decision, would them re-clicking the buttons (on Telegram) triggers that custom action again?

The external event triggers an intent. To display buttons, you would have a rule or story that responds to the event with an utterance that contained the buttons.

To trigger an action from the buttons, you would include in the rule/story the action to be triggered. In the Rasa docs I linked above, you could have rules like this:

- rule: mood great
  steps:
    - intent: mood_great
    - action: action_mood_great