Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

337
Vistas
MS Teams Bot -- Is it possible to invoke a botMessagePreview from a task/submit activity as opposed to from a composeExtension/submitAction activity?

I am building a messaging extension in Teams that uses task modules and sends adaptive cards.

I want to invoke the same task module from both a messaging extension command and from a button on an adaptive card that is sent to the user.

The intended flow through the application is the following:

End user launches a task module containing a react page by clicking a messaging extension command under the compose box -> user finds an object in the task module -> user clicks an 'export to chat' button on the react page -> microsoftTeams.tasks.submitTask() is triggered on the react page -> task module closes -> in the bot activity handler handleTeamsMessagingExtensionSubmitAction returns a botMessagePreview like shown here -> user is able to preview the adaptive card and can send it as a message from the bot to the chat.

The adaptive card contains a button "View Object":

   {
      type: "Action.Submit",
      title: "View Object",
      data: {
        msteams: {
          type: "task/fetch",
        },
        goToUrl: url,
      },
    }

From the adaptive card, I am able to invoke a task module, but this time I have to use handleTeamsTaskModuleFetch instead of handleTeamsMessagingExtensionFetchTask. This means that once the end user submits the task module they will not see the botMessagePreview because that functionality seems to be exclusive to the messaging extension. Is there any way I can work around this?

So far I have tried duplicating my logic from the messaging extension handlers in handleTeamsTaskModuleFetch and handleTeamsTaskModuleSubmit but I haven't found a way to avoid side effects that crash my app or a way to display the botMessagePreview.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This seems to be not possible to invoke a botMessagePreview from a task/submit activity.

botMessagePreview functionality is not supported for task/submit activity.

This functionality supported in Messaging extension.

Ref Doc: https://docs.microsoft.com/en-us/microsoftteams/platform/resources/messaging-extension-v3/create-extensions?tabs=typescript

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda