Send Email with Adaptive card in mail body with actionable Buttons using Power Automate

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
everyone welcome to another video in this video we will discuss how you can use adaptive cards using you know how we can send adaptive cards to send an email using Outlook right and we'll also see how we can when someone will respond in Outlook email when the data will be captured so it's kind of actionable adaptive cards in Outlook so we'll see how we'll do that so first of all you have to also also will use power automate to send that adaptive card as email body right so let us first design adaptive card uh so that we can use that in power automate send email functionality so just go to Adaptive cards website so that you can design one adaptive card so this is a adaptive card interface where I can go to designer and in the designer I can select the host app as Outlook actionable message this Outlook actionable message will help you to design a actionable Outlook actionable message driven adaptive card so click on new card here choose blank card and here I want to Define my card first thing is I want to capture name and a comment about a product that the customer is using so I want to use a text block first and give a data here let's say product feedback okay now I want to make it bold okay I can change the property of this block using this area okay you can change the font style depending on your requirement I can make it medium and most importantly change the target version as 1.0 as it is required okay so Pawn type just remove this okay it's not required so text block is done next I want to add a input text okay here I can define a ID let's say txt name okay and I can Define one text block before that but I can directly put a placeholder okay I can give your name enter your name next I want to put another input text and here the placeholder value will be entire feedback right then I want to add a so also this requires a ID so txt feedback and make sure that this is this supports multi-line text and next I want to add an action so click on this add action and click on action HTTP this action HTTP will help you to send a response a HTTP request from the car to any HTTP URL right so first design a URL how to design that HTTP URL go to Mac Dot and Here sign in using your official ID and create a new uh power automatic flow using HTTP request trigger or you can go to mac.parapps.com and navigate to the power automated from Power Platform link from here you can navigate to the power automate and use the credential same credential now let me create new one I want to create a new automated cloudflow and give a name here that the name is let's say capture http from Outlook okay now here you can search request when a new request is received or otherwise you can just skip it so that here you can provide information just search here request and choose request when a new HTTP request is received now give your name here compose and here I want to read the body so I have name and comment here option that I can use right so what I can do so I want to respond to the uh adaptive card that is actioned on the Outlook so we have to reply and just delete this so once the HTTP request is received from the Adaptive card I want to respond a message so how can you search response you can use the request and response here I can pass the information in the header you need to pass a specific uh body type called as card object in body so this will be the header which you passage to this will help you to respond a respond back to the Adaptive card action on the Outlook so card is true and here you need to provide a adaptive card information right so you can post as adaptive card or you can post as a uh normal text so for this you have to create a card adaptive card let me create one more adaptive card so create a new uh foreign and click on new card it's just a blank card I want to display here I want to display a text block which will display thank you for your submission okay now you can change this target version is 1.0 and copy this entire payload and use it in the body and this will be the Adaptive card that will be displayed to the user once someone takes Action Now save it so once you save it the URL will be generated you can copy this URL and go to the designer this is the designer we want to create so you have to provide the URL first here method choose Edge post I want to push some information but information you want to post you want to post the name and feedback that is selected so inside curly brushes you need to pass name and colon inside double curly brushes you need to refer the text boxes so txt name what is the ID you can check the ID is test name you can copy and you can provide in the body txtname Dot value n comma comment here you need to pass the same way txt comment dot value just make sure it is idgt common no it is txt feedback so go here and type your txt feedback okay now once it is done you can change the title if the title is submit now I have done so I can copy this entire uh script sorry entire payload of the Adaptive card and put it in the okay I have to put this adaptive card in the power automate because I will use power ultimate to send this adaptive card to the Outlook email so again create a uh new power automate to send an email using Outlook with adaptive card let me create a on-demand instant work my instant power automate so that I can trigger it manually and give a name sent Adam card in mail body okay now here I can choose Outlook manual trigger and here I want to use a new step now here I want to use a compost this compose step will help me to store the uh adaptive card below payload here I can put this so this is the Adaptive card that will be sent make sure the version is 1.0 now let me create a send email and using send email I can use Office 365 Outlook and send an email P2 to whom I want to send I want to send to the this user subject let's say feedback requested okay on our product okay now here in the body I want to specify something uh dear customer a print back now here click on this and you have to use the compose output but inside a script so what is that script let me tell you that script the script we have to use like this so you have to first uh use this HTML and insert that you need to pass the script tag because the Adaptive card should be available as is script tag so you have to go here and click on this code HTML View and the HTML view we need to put the information here let me put entire information and copy this okay I can use some paragraphs and in the output I can directly take help of the dynamic content output right so this is the output value of the previous compose step so which will render automatically from the Adaptive card now save it now we created a power automate which will use the Adaptive card to send a adaptive card on the email body using Outlook let us test this first if it is sending the card or not continue and run the flow done now let me open the Outlook so let me log in using the credential that I used now here I want to see that I got an email with feedback requested you see guys so there is a email I have received and when I click this I I get that email but I have not received any uh adaptive card so let me rerun this let me run this again so when I run this uh adaptive cards and workflow or power automate it will send female now you can see here I have received a form here where feedback requested mail is there and the Adaptive pad is available right and here the submit button is also available here now let me provide some information here say this is the name and feedback is the product is AWS foreign submit from Outlook it will call another Power automate because this submit action calls a HTTP request and this HTTP request is hosted in our power automate the power automatic will capture the HTTP request and respond with a feedback or response so if you click what it is telling the remote endpoint returned an error 401 I think we have not saved that let me check that okay so let me submit it is telling that is remote endpoint returned in error 401 please try again four zero one so let me check [Music] go back and check if it is running or not it is not running you just turn off and turn on [Music] now once it is turned on you can call it again okay white is telling because when we are submitting this request we have not added any authorization or you know headers so what you do you just go to the designer and in the designer where we have created this uh flow or created this adaptive card here you need to add some header so how to use header so click on the add new header and here you add a new header College authorization and keep blank authorization and another header called as content type content foreign type equal to content type equal to application session right this information you need to pass now copy the entire again and use it in the power automate and save it now let us test this click on test okay new email received okay but this time there is no adaptive card sometimes it happens this is a Microsoft block so let me uh again run this Pro now we have received another email here I have the uh information like the product feedback enter name and enter feedback right so let me enter my name here session J Royal feedback let's say good one now click on submit as soon as I submit it should actually call the web API HTTP request power automate and it will respond a thank you for your submission adaptive card you see guys how it is called and you can see the information here the Run status so this is the capture HTTP request where the request is received with this information name and oh here it is not returning the comment properly because the format we have sent is incorrect so we have to fix that also so let me check what you have mentioned here let me go to you see guys here we have done some mistake so properly use double curly brushes otherwise it will cause problem now you can use it in the workflow first time when it is running it is not sending the email with the body it is sending email about the Adaptive card is not uh displaying on the email body now this time when I receive that email I have this so let me put the name and the comment then click on submit now this submit should actually call the power automate with HTTP request and now it is called and thank you for your submission is displaying and action is completed now let me check the Run status of the capture workflow now here also when the HTTP request is received the name and comment is properly extracting and the response also here passing the Adaptive card with this thank you for submission so you can take help of this Dynamic values that is received from the HTTP request as a adaptive card for example let's say you want to use uh thank you for submission plus the dynamic value with name so here you can use thank you for your submission and after this I want to use Dynamic name of the customer so I can take help of this name now save it now this time what will happen when someone submit it will display thank you for submission with username so let's let's test this so first run this [Music] I can run this because first time it is not coming now another email with the subject or with the Adaptive card here let me provide some value [Music] and click on submit as soon as I submit it should actually call the HTTP request or HTTP power automate and I display the information here with the dynamic content okay now it is showing thank you for original Mission Rakesh radar and this is the name that has been provided in the uh first place in the name field right so you understand how in Outlook we can use uh the uh adaptive cards and the response is also captured with third party options right the most importantly how we can use the email body uh with a adaptive card with actionable buttons that was the motto of this uh this video okay so let me uh if you have any question on adaptive cards and actionable adaptive cards and Outlook just let me know then we will discuss so you can put in your comment what information you want to know about this okay if you have any challenges also let us know so that we can discuss thanks everyone bye
Info
Channel: Softchief Learn
Views: 10,088
Rating: undefined out of 5
Keywords: Dynamics, CRM, Dynamics 365, Power Apps, d365, power platform, dynamics 365 tutorials, dynamics crm training, adaptive csrd in mail body
Id: bXsXPZ60LFA
Channel Id: undefined
Length: 25min 21sec (1521 seconds)
Published: Mon Aug 14 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.