Utter action with button is not working


I have created two intents “response_success” and “response_failure” with enough data samples and created stories for responding with utter actions for these intents. I am using slack integration to check it and confirmed this is working fine and bot is responding correctly when I send the user input as text.

But, when I create a button action with these intents, the buttons are appearing correctly in the slack but no action is being performed, when I click on these button. My domain.yml code is given below.

  - text: Was my response helpful?
      - title: "Yes"
        payload: '/response_success'
      - title: "No"
        payload: '/response_failure'

I couldn’t see much help from the rasa doc regarding this. Kindly note that I confirmed these intents “response_success” and “response_failure” are working fine by sending the user input as text from slack. Only the button action is not working. So, please help me if I am missing something here.

Thank you, Anoop Mohan

Hey @anoopmohan, what version of core are you on? We’ve had issues with slack buttons before. Can you try the fix here?

Thank you @erohmensing, I am using the following versions:

rasa-core==0.14.3 rasa-core-sdk==0.14.0 rasa-nlu==0.15.0

Anyway, let me check that fix. Will post here, if it is still not working.

Thank you.

@erohmensing I updated the code based on that fix and the buttons are still not responding. But, I just noticed that, even the request is not received in “def webhook():” method, when I click the button from slack. Is there anything I need to do from slack side for this? Any idea?

Thanks, Anoop

Oh my goodness. There was a typo in my slack request URL. Sorry for the confusion. This is working now.

But, we need the fix that @erohmensing suggested. Thank you @erohmensing for your help.

Haha, glad you got the typo worked out.

I’m actually a little confused though. What did you change in core 0.14.3 to get it working? I’ve just looked at the code, and it seems the changes are already incorporated. E.g. here here and here all references to payload[0] have been removed. Did you add them back in (i.e. the opposite of the suggested change in the forum post?

In fact, I just tried locally and 0.14.3 works fine for me. Are you sure that’s the one you’re running/editing?

Really? Let me revert those fix and check it once again. Will update you tomorrow.

Hey @erohmensing, I checked it after reverting the code. It seems like the bot has stopped responding for the button actions when I remove that fix.

I am also using the same version as yours (rasa-core==0.14.3), but still I need this fix for performing button actions. That’s strange.

Let me know, if I still need to check something else for you. Happy to help :slight_smile:

Thank you,

Sorry I just mean to ask how you specifically fixed it. E.g. in that fix, it tells you that you should change all instances of ['payload'][0] to ['payload']. But in 0.14.3, these changes are already made. Did you do the opposite and add the [0] back in to make it work?

You are right !!!

The mistake was in my side only. I think I had played with slack.py by replacing it with an old version to verify the button action and forgot to replace it with the recent version again. That means, I was trying with the old version of slack.py.

I just replaced it with 0.14.3 and tried the button action again. This is working fine for me now. To summarize, there is no code change required in 0.14.3 version to make the button action work.

Sorry for making confusion :frowning:

Awesome! That makes so much sense, haha. I’m glad it’s working in any case, and thank you for helping me debug what’s going on!