Forum Discussion

JunZhi's avatar
JunZhi
Copper Contributor
Jun 13, 2020

Sending adaptive card and receive response in Teams using Python

Hi all,

 

I'm working on a project that involves sending adaptive cards to users and I also want to receive any response from the users and follow up to execute other actions (log down responses,comments etc...). My adaptive card is similar to this sample below: 

 

 

I have tried Microsoft Flow but it has many limitations that made me decide to go ahead with using Python instead.

 

I have three questions:

1) Must I create a Teams Bot using Python and Bot Framework in order to send adaptive cards and receive responses to do follow up actions?

2) I read that Microsoft Teams "Incoming Webhooks" only supports message cards and not adaptive cards. Do message cards allow for actions by end users?

3) Are there any other methods without creating a bot?

 

Sorry for the lengthy post and any help is greatly appreciated!! (:

  • JunZhi As per my view, Creating Bot in order to send adaptive cards and receive responses to do follow up actions is the best option. 

    • JunZhi's avatar
      JunZhi
      Copper Contributor
      Thank you for your reply! From the articles I've read online, creating a bot seems to be the most flexible way. Do you know if there are any downsides to using Python instead of other languages? (:
  • JunZhi - You can create a card with actions using message cards as documented here. You can send messages to team/channel using connector. 

    • JunZhi's avatar
      JunZhi
      Copper Contributor
      Hi Nikitha,
      Thank you for your reply!!
      From the link you provided, my understanding is that I can send cards with actions through a Python script and Teams connectors? Will this work on sending cards to chat groups (not Teams Channel/Groups)?
      • Nikitha-MSFT's avatar
        Nikitha-MSFT
        Icon for Microsoft rankMicrosoft

        JunZhi -  Connectors are supported to send message inside teams/channels. If you want to send the message to 1:1 chat or group You can use bot

Resources