Search code examples
botframeworkmicrosoft-teams

Question regarding MS Teams bot framework button


I was wondering whether its possible to put multiple types (imback and openURL) in just one button?

Example: I have a config for an openurl button below:

{
 'type': 'Action.OpenUrl',
 'wrap': True,
 'title': 'link',
 'url': 'youtube.com'
}

Here is my config for submit (imback) button:

{
 'type' : 'Action.Submit',
 'title' : value,
 'wrap': True,
 'data' : {
  'msteams": {
   'type': 'imBack',
   'value': 'open url'
  }
 }
}

Is there a bot framework feature that combines both of the above functionalities in just one button press?

I attempted to combine it under the same button, but when I press the button, it ignores the action.Submit and instead acts as an action.openUrl.


Solution

  • No, it's not possible to combine multiple types of actions (like 'imBack' and 'openUrl') in a single button. Each button can only perform one action at a time.