cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gfiorenzano
Frequent Visitor

HTTP Post to Teams not working

I am working on creating a flow where a new Item in a Sharepoint list triggers and approval process. It works fine but I want to add another action, upon approval, to post a message to a MS Teams channel. The idea is to have the card posted with a link to the Sharepoint Item.

I keep getting a "400" code "Bad payload received by generic incoming webhook."

I have tested it using Fiddler and it worked. My only guess is when I insert Dynamic links it breaks? Any help?

 

(
    "@@type": "MessageCard",
    "@@context": "http://schema.org/extensions",
    "summary": "This is the summary property",
    "themeColor": "0075FF",
    "sections": [
        {
            "heroImage": {
                "image": "https://calgarychamber.sharepoint.com/SiteAssets/CC-logo-symbol-lines-RGB-01.jpg"
            }
        },
        {
            "startGroup": true,
            "title": "**Item approved**",
            "activityImage": "Image here"
            "activityTitle": "Approved by **Gabriel Fiorenzano**",
            "activitySubtitle": "email here",
            "facts": [
                { "name": "Title:", "value": "Test 4" },
                { "name": "Submitted on:", "value": "2017-12-04" }    
            ]
        },
        {
            "potentialAction": [
                {
                    "@@type": "ViewAction",
                    "name": "View document",
                    "target": [
                       "Link to file"
                    ]
                }
            ]
        },
        {
            "startGroup": true,
            "activitySubtitle": "This message was created by an automated workflow in Microsoft Flow. Do not reply."
        }
    ]
}
2 REPLIES 2
v-yamao-msft
Community Support
Community Support

Hi gfiorenzano,

 

Could you show me a screenshot of your flow configuration?


You said that “The idea is to have the card posted with a link to the Sharepoint Item”, have you used the dynamic content “Link to item” in the Message field?


To reproduce this issue, I created a flow likes below.


In the Message field, I selected the dynamic contents “Link to item” and “Title”. Once the item is approved, the message could be posted to the channel without issue.

3.PNG

 

From the error message you provided, it seems that an invalid syntax is sent to the channel. If possible, please also share a screenshot of the flow run details.

 

I will try to reproduce this issue on my side.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks! Here is the flow and the dynamic fields I am using. Could it be that it only accepts dynamic content from SharePoint and not the "Approval" content? Everything works up until the HTTP Post

 

I also noticed you are posting a message and that works for me. However I wanted to use the message card (Like demonstrated here - https://www.youtube.com/watch?v=jfbjiIqLZV8)

 

image.pngimage.pngimage.png

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,792)