How can I send an email using an adaptive card with button in bot framework composer?

Viewed 216

I created an adaptive card with an action.sumbit to send an email, but I can't get it to send the email.

I leave you the adaptive card.

 {
  "type": "AdaptiveCard",
  "version": "1.0",
  "body": [
    {
      "type": "TextBlock",
      "size": "large",
      "weight": "bolder",
      "text": "MAil"
    }
  ],
  "actions": [
    {
      "type": "Action.Submit",
      "data": {
        "myName": "asds",
        "myEmail": "ASASAD@fadff.com"
      },
      "title": "Send Email"
    }
  ]
}
1 Answers

You can send an email from within Composer by using the 'Send an HTTP request' action located under 'Access external resources'. Microsoft Graph, and possibly other services depending on who you use and what they offer, has an API endpoint you can utilize for sending an email thru via a POST request.

You can experiment with the API by visiting the link I included above. Reference docs regarding the REST API are available here.

The basic setup is, upon the user clicking submit on the adaptive card, the HTTP POST call will be made to the API sending the generated email.

Related