1

I am using Microsoft's message/action cards to send it to office outlook email and take necessary action when clicking on one of the buttons. This piece works fine.

But, now I want to use refresh cards feature to update that same email/card with say a message like RESTART PERFORMED

So I do the following

                    "potentialAction": [{
                        "@type": "ActionCard",
                        "name": "Restart",
                        "inputs": [{
                            "@type": "TextInput",
                            "id": "comment",
                            "isMultiline": False,
                            "title": "Add a comment here for restart"
                        }],
                        "actions": [{
                            "@type": "HttpPOST",
                            "name": "Restart Application",
                            "headers": [{"CARD-UPDATE-IN-BODY": True}],
                            "body": json.dumps(newcard_data),
                            "target": "https://73zed3u4sf.execute-api.us-east-1.amazonaws.com/test/restart"
                        }                           ]
                        }]   

But I does not refresh my card. I also tried "headers": [{"CARD-UPDATE-IN-BODY": "true"}] but doesn't work either.

Also here

newcard_data = {
                        "@type": "MessageCard",
                        "@context": "http://schema.org/extensions",
                        "themeColor": "0076D7",
                        "summary": "STATUS MESSAGE",
                        "sections": [{
                            "activityTitle": "NEW TASK",
                            "activitySubtitle": "On Project EB EVENTS",
                            "activityImage": "someimage",
                            "facts": [{
                                "name": "STATUS",
                                "value": "EC2 Rebooted"
                            }],
                            "markdown": True
                        }],
        }  

Any help will be appreciated.

Thanks.

craigcaulfield
  • 3,381
  • 10
  • 32
  • 40

0 Answers0