Forum Discussion

AshuJadhav's avatar
AshuJadhav
Copper Contributor
Nov 16, 2024

What if post adaptive card and wait for a response timeout

Hi Team,

Scenario:  Post the adaptive card to the team chat. If the user doesn't respond after 2 hours, the adaptive card should be updated as "Expired"with a new design on the same conversation.

In an attempt to comply with this, I used a "Post adaptive card in char and wait for response."


Challenges: What would happen if I posted an adaptable card and waited for a response timeout? I wouldn't get a response. An error is being thrown.

Expectations include waiting for a response after receiving an adapted card. In any case, your card has already produced a message ID and posted.
This action should to return a Message Id in the event that a timeout occurs.

 

Would you kindly respond if you have discovered a solution?

14 Replies

  • apal26's avatar
    apal26
    Copper Contributor

    Hi,

    I have found a solution to this, without using any premium connectors. 

    The solution is to run a parrallel branch, use the Get messages in a chat block. You need the conversationID for this to run, so you need to Create a chat (cannot be yourself or workflow bot). Once you have the chat, save the conversationID to be used in Get messages in a chat block. Retrieve the last couple of messages, filter the messages by equals(item()?['attachments']?[0]?['contentType'], 'application/vnd.microsoft.card.adaptive') and voila, the first body of the filter array contains the message id as id.

    I can provide the step-by-step code if required.

  • MidhunArumugam's avatar
    MidhunArumugam
    Copper Contributor

    I’m running into the same problem, and I’m unable to find a solution : (

  • SmallTalk70's avatar
    SmallTalk70
    Copper Contributor

    We have the same issue. I can't wait for a solution. Any news? 

    • SmallTalk70's avatar
      SmallTalk70
      Copper Contributor

      We oped a case microsoft and need votes now:
      https://ideas.powerautomate.com/d365community/idea/82f5f00e-5448-f011-a2da-7c1e52d5cd5d

  • cleung625's avatar
    cleung625
    Copper Contributor

    Hi Sayali-MSFT​ ,

     

    I have the exact same issue. It's pretty frustrating that the MessageID disappears upon timeout because we want to update the card should it exceed a certain time period. Is there a solution for this issue? 

     

    Thanks for your help in advance

  • I would like the same.

    Happens the an adaptive card waiting for a response and that then times out, does not produce the message ID and so I am not able to update it.

     

    Is there a solution for this?

      • Nicodemeus007's avatar
        Nicodemeus007
        Copper Contributor

        haha you gotta be kidding me. Can you read english above? The whole rant was about timeout and you give this example. You have taken us for a fool? Who is the fool now?

        Microsoft engineers are a JOKE

    • AdaptiveCardNewbie's avatar
      AdaptiveCardNewbie
      Tin Contributor

      Hello,

      To update an adaptive card we need the message ID, which is not listed in your post.

       

      Or is there something else?

    • Sayali-MSFT's avatar
      Sayali-MSFT
      Icon for Microsoft rankMicrosoft

      Hello @AshuJadhav, could you please confirm if your issue has resolved with above suggestion or still looking for any help?

    • sdeep789's avatar
      sdeep789
      Copper Contributor

      Has there been any progress on this issue? I am experiencing the same as OP, if the adaptive card times out there is no way to update a card with this info as the messageId isn't available.