Devarshi Goswami
Devarshi Goswami

Reputation: 1225

Configure microsoft teams incoming webhook json payload

I am trying to set up an incoming webhook to a Microsoft teams channel using the incoming webhook connector. The payload that I am trying to send from my platform looks like this and is form CleverTap (which is failing so I'm trying to debug it using postman). but I am getting the error Summary or Text is required.

{
  "profiles": [
    {
      "email": "[email protected]",
      "identity": "foo",
      "objectId": "-g55b74fb1030740e4a4931910a8abb862",
      "profileData": {
        "Last Score": 308,
        "High Score": 308,
        "Replayed": true
      },
      "name": "Jack"
    }
  ]
}
  1. What am I doing wrong?
  2. will I need to change the JSON payload according to the adaptive card syntax for teams to accept the incoming webhook? If so, where can I add my custom payload in the adaptive card JSON body?
  3. are there other authentication factors at the webhook endpoint (do I have to whitelist the ip address from where the POST message is being sent from)?

Upvotes: 4

Views: 27853

Answers (3)

vitaluha
vitaluha

Reputation: 183

Pass a summary block with short text - it will be used in message preview.

"summary": "your text here".

Upvotes: 0

user22715125
user22715125

Reputation: 31

I had a similar issue and solved it, by just adding the summary key that they asked for. I think this should do the trick:

{   "summary": "summary",
    "profiles": [
    {
      "email": "[email protected]",
      "identity": "foo",
      "objectId": "-g55b74fb1030740e4a4931910a8abb862",
      "profileData": {
        "Last Score": 308,
        "High Score": 308,
        "Replayed": true
      },
      "name": "Jack"
    }   ] }
    

Upvotes: 1

Gousia Begum
Gousia Begum

Reputation: 2124

To send a message using incoming webhook, you must post a JSON payload to the webhook URL. This payload should be in the form of O365 Connector card. Payload of any other format is not acceptable in Teams. Here is an Example Connector card that you can post. You can now also send an Adaptive card using incoming webhook. Please check the docs here.

Upvotes: 9

Related Questions