0

Is there any way to create a new task within a Planner (Task) tab within a channel by using webhooks?

Either directly or having a button on the incoming message that then creates the task once the end user presses it?

I'm new to webhooks but having a look on Google, Power Automate is a way of doing it but not sure we have access to that.

I think I went down the wrong rabbit hole of task modules as I want to use what's already configured within the Planner tab and not create something bespoke. The button also doesn't work, comes up with an error message saying "This card action is disabled because it is not supported for Connectors". But this is what I have at the moment:

{
    "type":"message",
    "attachments":[
        {
            "contentType":"application/vnd.microsoft.card.adaptive",
            "contentUrl":null,
            "content":{
                "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
                "type":"AdaptiveCard",
                "version":"1.2",
                "body":[
                 {
                     "type": "Container",
                     "id": "066de76b-17da-e6f7-8ab3-81d36d8a6162",
                     "padding": "None",
                     "items": [
                     {
                         "type": "FactSet",
                         "id": "10eebecd-851c-2080-24f4-9b6044821d90",
                         "facts": [
                         {
                             "title": "**ID**",
                             "value": "EXAMPLE ID"
                         },
                         {
                             "title": "**Name**",
                             "value": "EXAMPLE NAME"
                         }
                       ]
                     }
                    ]
                  },
                  {
                      "type": "Container",
                       "id": "879303cd-81de-618a-8e99-e66be9f22ac1",
                       "padding": "None",
                       "items": [
                       {
                           "type": "TextBlock",
                           "id": "0833d313-657b-b587-d4d3-f4a961e6434a",
                           "text": "EXAMPLE ERROR MESSAGE.",
                           "wrap": true
                       },
                       {
                           "type": "Container",
                           "id": "de1d9a46-b8d4-443a-5afc-8843c445cf7b",
                           "padding": "None",
                           "items": [
                           {
                               "type": "ActionSet",
                               "id": "3b0c8763-dba8-3d88-98f5-7189ced1fe60",
                               "actions": [
                               {
                                   "type": "Action.Submit",
                                   "id": "btnCreateTask",
                                   "title": "Create Task",
                                   "card": {
                                       "type": "AdaptiveCard",
                                       "padding": "None",
                                       "$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
                                            }
                                        }
                                    ]
                                }
                            ]
                        }
                    ]
                }
            ]
      }
      }
   ]
}

Thanks in advance for any help/suggestions

glh92x
  • 1
  • 2
  • `Action.Submit` action type is not supported in incoming webhook. The connector cards support the following actions: `ActionCard`, `HttpPOST`, `OpenUri`. Ref: https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using?tabs=cURL#create-actionable-messages – Prasad-MSFT Jan 31 '23 at 06:06

0 Answers0