Forum Discussion

sangeetha_pl's avatar
sangeetha_pl
Copper Contributor
Apr 27, 2022

send HTTP post to my API from ms-teams

  • We have configured a webhook connector to post messages to a teams channel
  • The message is basically an Adaptive card with actual content and actions buttons.
  • since we don't have any bot, I need a way to send HTTP post request to my API when the user clicks one of the Action buttons.
  • But looks like "Action.Submit"/"Action.Execute" wont work as error stated => 

    this card action is disabled because it is not supported for Connectors

  • Is there any way to implement a workaround for this?

4 Replies

  • mukesh-pando's avatar
    mukesh-pando
    Copper Contributor
    We are also trying to do the same in the above message. We need to find the user who took action on a specific message. Is there any way to implement a workaround for this?
    • Nivedipa-MSFT's avatar
      Nivedipa-MSFT
      Icon for Microsoft rankMicrosoft

      If you are sending message via bot then user can take action but if it is via connector then there is no way to do this.
      Could you please raise a feature request here: Microsoft Teams Community

  • @sangeetha - Action.Submit is not supported for connector.

    It works if we send card via bot action only.

    Ref Doc: https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using?tabs=cURL#send-adaptive-cards-using-an-incoming-webhook

    Thanks,

    Nivedipa
    ------------------------------------------------------------------------------------------

    If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link.

    • Rbiaggio's avatar
      Rbiaggio
      Copper Contributor

      Nivedipa-MSFT,

       

      Sending an http post through Teams is not possible? I'm trying to make a post on an API I have. Expected body is below, but this is not working.

       

      {
      
      "@type":"ActionCard",
      
      "name":"Adicione um comentário",
      
      "inputs":[
      
      {
      
      "@type":"TextInput",
      
      "id":"comment",
      
      "isMultiline":false,
      
      "title":"Adicione um comentário"
      
      }
      
      ],
      
      {
      
      "@type":"HttpPOST",
      
      "name":"Add comment",
      
      "target":"URL TENANT DYNATRACE/{PID}/comments?Api-Token=",
      
      "body": "message:={{comment.value}}",
      
      "bodyContentType":"application/json"
      
      }
      
      Expected body
      
      { "message": "string" }

Resources