Botframework-webchat: Not able to send the Adaptive card to users by using Microsoft flow but getting only JSON in my email

Created on 23 Apr 2019  路  11Comments  路  Source: microsoft/BotFramework-WebChat

Support

All 11 comments

Hi @saikiran-sankey. I'd like to help but I have a few questions.

  1. Can you explain what you mean when you say you're using Microsoft flow?
  2. Are you using the Web Chat channel or the email channel?
  3. Would you please provide your relevant code?

Thanks, @v-kydela for your quick reply ~~
I'm using a Microsoft Flow to create a flow
In that flow, I want to send the Adaptive card to respective users on predefined time(scheduler)
like Approval in Microsoft Flow.
When I'm sending the adaptive card, the respective users get the JSON, not the Adaptive card.
My question - Is it we can send the adaptive card through email and respective users get the Adaptive card.
And also
Are the Mobile users can also get the adaptive card in their outlook app.

@saikiran-sankey - So to clarify, you are using this: https://flow.microsoft.com/en-us/

And you want your users to receive an email with an Adaptive Card. So you're not using Web Chat at all.

Is that correct?

Please provide the code you're using to generate and send the Adaptive Card.

@v-kydela yes exactly...
Currently I don't have code with me
But as simple I got the code for the normal adaptive card from playground and adding into my flow.That's it!
But my users get only the JSON used to create the adaptive card

@saikiran-sankey - Do you mean the playground in this repo?

I don't see any Adaptive Cards in there. Can you show me the Adaptive Card?

@v-kydela here is my adaptive card JSON

{
  "type": "AdaptiveCard",
  "version": "1.0",
  "body": [
    {
      "type": "TextBlock",
      "text": "**Action.ToggleVisibility example**: click the button to show or hide a welcome message"
    },
    {
      "type": "TextBlock",
      "id": "helloWorld",
      "isVisible": false,
      "text": "**Hello World!**",
      "size": "extraLarge"
    }
  ],
  "actions": [
    {
      "type": "Action.ToggleVisibility",
      "title": "Click me!",
      "targetElements": [ "helloWorld" ]
    }
  ]
}

@v-kydela and the above JSON I'm inserted in another file like this

<html>
<head>
<Meta http-equiv='Content-Type' Content='text/html;charset=utf-8'>
<script type = 'application/adaptivecard+json'>
  // Here The Above JSON
</script>
</head>
<body>
<p>
Take action
</p>
</body>
</html>

Are you trying to send an Actionable Message like this? https://docs.microsoft.com/en-us/outlook/actionable-messages/adaptive-card

You need to ask for help from the appropriate team. This repo is about Web Chat, a Direct Line client used to talk to chat bots with the Bot Framework. It has nothing to do with Microsoft Flow or email and has very little to do with Adaptive Cards.

Please consider asking a question on Stack Overflow

I'm closing this issue as unrelated.

@v-kydela okay. anyways thanks for your help!!

I tried insert the json in html tag and it worked, thanks for your solution, wonder if you have solved your issue, were you using the email connector and have you set "isHTML" tag to "Yes"

Was this page helpful?
0 / 5 - 0 ratings