0

I am building a messaging extension app for MS Teams using the Teams-Toolkit in Visual Studio Code. I have been able to launch task modules from the message context without a problem but is there a way to launch a task module from handleTeamsMessagingExtensionSelectItem(context, obj)? The goal is for the user to select an item from the query list which triggers a new task module where they can fill out and submit a form (adaptive card).

  • Task modules can be invoked from tabs, bots, or deep links. The response can be either in HTML, JavaScript, or as an Adaptive Card. The following link summarizes how it works:https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/task-modules/invoking-task-modules – Prasad-MSFT Dec 21 '21 at 08:21
  • I am very familiar with the existing MS documentation and how to invoke task modules, but the one thing they do not cover is how to invoke a task module from a query select item. Surely it must be possible, otherwise the functionality is extremely limiting. – someonelikeTIM Dec 21 '21 at 14:21
  • Please provide enough code so others can better understand or reproduce the problem. – Community Dec 28 '21 at 18:30
  • 1
    @someonelikeTIM: I see it is not feasible to do as required. Here is the reason: Task module can be opened using TaskModuleResponse return type. Only TeamsTaskModuleFetchAsync method supports TaskModuleResponse return type. And TeamsMessagingExtensionSelectItemAsync method return type can be MessagingExtensionResponse only. As this response type can't be changed. So, overall not feasible. – Subba Reddi Tummuru Dec 29 '21 at 15:56

1 Answers1

0

For more visibility, adding the answer from the comment section:

Task module can be opened using TaskModuleResponse return type. Only TeamsTaskModuleFetchAsync() method supports TaskModuleResponse return type.

TeamsMessagingExtensionSelectItemAsync() method return type can be MessagingExtensionResponse only. As this response type can't be changed. So, overall not feasible.

ChetanSharma-msft
  • 702
  • 1
  • 3
  • 6