Search code examples
adaptive-cards

Automatically re-render Adaptive Cards in Outlook


I'm building an intergration with Microsoft Adaptive Cards and I need to know if it's possible to automatically refresh the card contents in Outlook every X seconds (or add a listener to an external service and update the card's content accordingly but I'm pretty sure that's not possible).

It'd be just like an action but instead of being triggered by the user, it'd be triggered periodically without needing any input from the user.


Solution

  • Adaptive Cards currently do not support that kind of functionality on their own. I've heard people talk about that earlier so maybe the guys consider adding that but right now its not supported.

    However, what you could do is as you said have your service "update" the card. When you send a card to Outlook you get a response with a message id. You can use that id to update the message you sent and can send a new card to update it.

    Its similar to what is described here: https://learn.microsoft.com/en-us/outlook/actionable-messages/adaptive-card#refresh-cards . You do not necessarily need to wait for a callback you can update a card yourself.