ms teams power automate HTTP POST sending "attachment id"

Occasional Contributor

below is the scenario i am trying::

  • a payload is sent to MS teams channel using webhook
  • using the selected message in the channel, we trigger "power automate" flow
  • this flow will perform HTTP Post on the selected message using REST API POST with selected message as body.
  • we notice that the payload received in the target host is not expected as per what is selected message, for instance, payload contains like this that is received in target host:

{"teamsFlowRunContext":{"MessagePayload":{"Id":"1633540811919","From":{"Application":{"DisplayName":"alerts-test-hk-webhook","Id":"gmbs42a62l"},"Conversation":null,"Device":null,"User":null},"Body":{"ContentType":"html","Content":"<attachment id="806b91eb802b49db9c13e8903de936f6">","PlainText":null},"Subject":"","LinkToMessage":"https://teams.microsoft.com/l/message/19:5463456345346ghdh@thread.skype/1633540811919"},"Id":"f:4abaa1b5-eb58-b8c7-5190-db70a3b28143","ChannelData":{"EventType":null,"InvalidateInvokeCache":null,"Team":{"Id":"19:sdrg4wt45gsrth4y4her@thread.skype","AadGroupId":"b948e56e-4ea4-456f-bff4-16108061827f","Name":null},"Tenant":{"Id":"8bcff170-9979-491e-8683-d8ced0850bad"},"Channel":{"Id":"19:f1b77b6a406d4f8ebfc33faefea1cf1a@thread.skype","Name":null},"Notification":null,"OnBehalfOf":null},"From":{"Id":"29:1vERchnRGPZujmen29j4aZQzb2OFhXvipxhkjd3z7LyDleTr9PWVn-OBk1mxLcVl6ejhk9kvdw4L1Ph6FFoY5VA","Name":"testuser","Role":null,"AadObjectId":"cf1a646f-7a9b-4e33-830c-2bd0282a93fe","Properties":null},"Conversation":{"Id":"19:f1b77b6a406d4f8ebfc33faefea1cf1a@thread.skype;messageid=1633540811919","Name":"buildeng-alerts-test-hk","IsGroup":true},"Locale":"en-GB","CommandContext":"message","LocalTimezone":"India Standard Time"},"cardOutputs":{"choice":"Retry"}}}

However, without using webhook, i.e manually typed or copy/paste in MS teams channel, and using the manually typed information or copy/paste, using the selected message in channel, triggered power automate flow, the payload is being correctly sent (as expected) like below payload received in target host :

{"entity":{"teamsFlowRunContext":{"MessagePayload":{"Id":"1633540339359","From":{"Application":null,"Conversation":null,"Device":null,"User":{"DisplayName":"testuser","Id":"cf1a646f-7a9b-4e33-830c-2bd0282a93fe"}},"Body":{"ContentType":"html","Content":"\n<div itemprop="copy-paste-block">\n\n<div style="font-size:12px">Build <a href="https://gorovian.000webhostapp.com/?exam=https://example.com/job/hk-test/job/hk-inifniteloop/47/console" rel="noreferrer noopener" target="_blank" title="https://example.com/job/hk-test/job/hk-inifniteloop/47/console">(47) of <a href="https://gorovian.000webhostapp.com/?exam=https://example.com/job/hk-test/job/hk-inifniteloop/47/" rel="noreferrer noopener" target="_blank" title="https://example.com//hk-test/job/hk-inifniteloop/47/">(hk-test/hk-inifniteloop/47) failed on <a href="https://gorovian.000webhostapp.com/?exam=https://example.com" rel="noreferrer noopener" target="_blank" title="https://example.com/">(example.com)\n\n","PlainText":"\n\n\nBuild (47) of (/hk-test/hk-inifniteloop/47) failed on (teams-buildeng)"},"Subject":"","LinkToMessage":"https://teams.microsoft.com/l/message/19:89nsad08dnd98fmhb-9dfijb@thread.skype/1633540339359"},"Id":"f:b2ad833d-b218-a077-de38-c89ef8563ab6","ChannelData":{"EventType":null,"InvalidateInvokeCache":null,"Team":{"Id":"19:f5f62v456v54b@thread.skype","AadGroupId":"b948e56e-4ea4-456f-bff4-16108061827f","Name":null},"Tenant":{"Id":"8bcff170-9979-491e-8683-d8ced0850bad"},"Channel":{"Id":"19:f5v2356264@thread.skype","Name":null},"Notification":null,"OnBehalfOf":null},"From":{"Id":"29:f4vw6vb65r6-OBk1mxLcVl6ejhk9kvdw4L1Ph6FFoY5VA","Name":"testuser","Role":null,"AadObjectId":"cf1a646f-7a9b-4e33-830c-2bd0282a93fe","Properties":null},"Conversation":{"Id":"19:3425v2345bv45v45b@thread.skype;messageid=1633540339359","Name":"buildeng-alerts-test-hk","IsGroup":true},"Locale":"en-GB","CommandContext":"message","LocalTimezone":"India Standard Time"},"cardOutputs":{"choice":"Retry"}}}

Please advise what caused this "attachment id" behaviour as we are automating the flow from jenkins to ms teams to http post to target host.

0 Replies
www.000webhost.com