cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
joetalbot89
Level: Power Up

Issues with HTTPpost inside Message Card

Hi Guys,

 

Hoping you can help.

 

We are trying to setup a Flow that posts logged tickets (from freshdesk) to a MS teams channel, we have set this up without issue but i would like to use the Message Card actions to acheive the below.

 

1. Add note to ticket

2. Escalate the ticket

3. View ticket in freshdesk (WORKING)

 

For options 1 & 2 I have created 2 seperate flows with a HTTP Request, Im able to get this working via postman without issue but when i try and use withing the message card i get the error "

The remote endpoint returned an error (HTTP Unauthorized). Please try again later."
 
Below is a the code from the message card
 
{
    "@type": "MessageCard",
    "@context": "https://schema.org/extensions",
    "summary": "Issue ",
    "themeColor": "25C16E",
    "title": "Ticket opened: \"@{body('Parse_Ticket_Info')?['subject']}\"",
    "sections": [
        {
            "activityTitle": "@{body('Parse_Company')?['name']}",
            "activitySubtitle": "@{body('Parse_Ticket_Info')?['created_at']}",
            "activityImage": "https://yt3.ggpht.com/a-/AAuE7mAJfD_hbpzv3MGV2cvMbKp_3bIDwPZoDpS6-w=s288-mo-c-c0xffffffff-rj-k-no",
            "facts": [
                {
                    "name": "Logged By:",
                    "value": "@{body('Parse_Contacts')?['name']}"
                },
                {
                    "name": "Ticket #:",
                    "value": "@{body('Parse_Ticket_Info')?['id']}"
                }
            ],
            "text": "@{body('Parse_Ticket_Info')?['description_text']}"
        }
    ],
    "potentialAction": [
        {
            "@type": "ActionCard",
            "name": "Add a comment",
            "inputs": [
                {
                    "@type": "TextInput",
                    "id": "comment",
                    "title": "Enter your comment",
                    "isMultiline": true
                }
            ],
            "actions": [
                {
                    "@type": "HttpPOST",
                    "name": "Submit",
                    "headers": "Content-Type:application/json",
                    "target": "https://prod-07.westeurope.logic.azure.com:443/workflows/568fd2f6bc23469da79d83628b9e4960/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=ZACM3IO_17W-D2IDB_zSzdfGXC88FSYjns-nP2H8LPo",
                    "body": "{\"comment\":\"{{comment.value}}\", \"Ticket\":\"@{body('Parse_Ticket_Info')?['id']}\"}"
                }
            ]
        },
        {
            "@type": "HttpPOST",
            "name": "Escalate",
            "target": "https://prod-07.westeurope.logic.azure.com:443/workflows/568fd2f6bc23469da79d83628b9e4960/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=ZACM3IO_17W-D2IDB_zSzdfGXC88FSYjns-nP2H8LPo"
        },
        {
            "@type": "OpenUri",
            "name": "View in FreshDesk",
            "targets": [
                {
                    "os": "default",
                    "uri": "https://848group.freshdesk.com/a/tickets/@{body('Parse_Ticket_Info')?['id']}"
                }
            ]
        }
    ]
}

I have highlighted the sections in red where the HTTPPost is made to the URL/Target of the HTTP Request trigger in flow.

 

Thanks in advance

 

Joe

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,984)