Return table from power automate to canvas app using Response Action

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello everyone in this video i will tell you how we can return a tabular format data from power automate to power apps or canvas apps right so this is a currency layer website so i will connect to the third party currency layer from power automate and this currency layer always gives the current exchange rates of a source currency and the target currency exchange rates like you see here for usd currency what is the canadian dollar exchange rates and other things also it is displaying here so to get the current exchange rates by uh sending the source currency uh how we can get this data in our power automate so that the power automate will send the tabular format with this data to canvas apps i have already shown you another video how to display this uh single data but this time i will show you table or data right so what i have done i have taken a created a new power automate flow and taken the powerapps trigger so let me create this from scratch so that you can understand more so i can go to powerautomate.microsoft.com and sign in and use my correct correct environment to store my store my power automate so i have already created this but it is always the best practice to show you from scratch so that you can understand so before calling a power automate from canvas app you have to create your powerapps with powerapps trigger right so i'll go here and choose my correct environment and i'll go to create a new flow so this time i'll create a new flow instant cloud flow and this time i will skip this here i will give the name i will give the name for power automate the power of name let's say fetch let us load this first so give a name let's say fetch currency okay now here i will choose powerapps as a trigger so just search powerapps you will find uh two powerapps triggers so always choose the second one version two because it gives more flexibility so that you can add input parameters right now i don't want to add any parameter okay so this powerapps trigger will be used to call from canvas apps otherwise it this power automate cannot be called so once the trigger is identified i want to call a third party web service called as currency layer if you don't have uh you know credentials for currency layer you have to sign up free and if you sign up free it will give a api key for you and when the api q will be given the if you provide the access key and the currency i have already created this in my last video you can check that and here you have to fast the which currencies accentuates you want and what is the source currency so if you hit this url it will give the return result in session right so we need to page we need to send a web request or http request to this url so that i can get this result and this result which is available in the course object i will send to the canvas app so i'll go here and create a new step add http [Music] okay i'll choose http and use get edgevar and the url i'll put the same url because this is the url that is available so this is the url that is available to call right so i can save it and test it now let us test that what is the response that is returning from this http server http request now click on the run flow and done now what is the next thing the next thing is the http request now it is success right the http request responded with a body now this body i want you see it is returned successfully now what i will do i will just copy this body and click on edit again and do another step here to par suggestion use data operation and power session and use the content what is the content i want the body right and what is the schema which i want to pass the body body content what is available here i have copied that is a gesture format right so i want to pass the json format to using this partition schema it requires schema so click on generate from sample and i have copied the body information now click on done so it will create a schema for you now why persuasion is required because if you use power station you can patch or the injection properties according to your need i want to read this code information isn't it right so what i need to do so once the data is fetched from the third party service i want to send to the powerapps there are two ways you can send powerapps one is if you click on step and search powerapps then you will find there is a section called as respond to a power up or flow you can use this action otherwise you can use a response the difference between respond to a powerapps and response is like if you use respond to powerapps you can define this type of output parameters but there is no tabular format isn't it there's no tabular format that's why it is best practice if you want to return some json object as a tabular format use response so just search response [Music] and here you will find request and use response here you have to pass the body information what you need to pass i need to pass the body like injection format you see here i want to use currencies so i want to use like this and insert that i want to define a object called as currencies so you have to define like a session variable currencies colon and here i want to use a square bracket because there are multiple currencies available and inside that you need to pass another caller brushes and here you need to pass whatever uh exchange rates you want first i want usd euro right so i can copy this what is the european um exchange rates of usd social usd source currents right so from where i can get this value from this dynamic value now if you search here usd you will find usd euro so how it is retrieved if you do not pass the gesture object that is available in the response body then you cannot get it so passation is important like that you can add comma and add other information that you want i want the gbp conversion rate also and i can use the dynamic variable usd gbp next i want another [Music] i want the canadian dollar [Music] and another is plm right so usb usd pln i can choose ustpln so these are from powerstation step now this will create a json object with an array and it will send to the canvas app as a response and if you set a variable and ascend this response data in a variable then that will be available as a table let us see how it is done now here you see when you are doing a response body is required but still the response body gesture schema is also required so what you do you have to just copy this and store in a notepad and instead of this add the red symbol something just type some sample data so that it will generate the schema right i can copy this and go to here use generate from sample and click done now this schema is already created the schema should match with the value that is available in the body right now click on save so i have done my flow click on save [Music] okay now i want to create a canvas app to call this so i'll go here and create a canvas app and go to create click on blank app click on canvas app [Music] let's say return table from flow now i want to call the power automata i have created right so this power automate now if you run it how it works let us see click on manually and test it now it will try to fetch all the currencies and create a json response object here you see it is an it is an array type uh currency and error type json variable so i can page here in the conversion i'll go here and what i'll do i'll just take a rectangle here you can design h4 you need because canvas up provides a very flexibility for designing i can take a button here and replace this edge fetch currency exchange rates and here i want to take a data table because i want to display the exchange rates in it data table right now what i'll do i want to call the power automatic isn't it so what i will do i will click this button and go to power automate and add flow you will see page currency exchange that says available i can click this so that it will be available in my canvas apps now i want to call this on button click so what i have to do i will go to unselect property of the button and write down the name of the power automatic so what is the name fetch currency rate dot ron now whenever it will run it will do some response right it will give some response so i will initialize a variable let's say currency or rates comma run so what it does it means when you click the button it will call the hx it will call the power automate and the response will be stored in this variable rates variable set is used to declare a global variable now i can assign this rates this rates a variable in the table right so i can go here in the items and type down rates then currencies right now currencies is a tabular format right that's why it is associated i can click on edit to associate the fields you see every data is available i can click on add right now let us test this run this immediately whenever you call this it will try to call the third party service and paste the data here you see how it is bound here because of the response object okay you see this is the data euro data 0.95 and here it is available 0.95 right so this way you can uh return tabular format from your power automate to canvas app no need to use respond to powerapps rather you can use response to define such type of array type thing and your work is done so thank you for your time guys i hope it will help you in your project see you guys and if you have not subscribed please subscribe this channel see you guys bye [Music] you
Info
Channel: Softchief Guru
Views: 6,444
Rating: undefined out of 5
Keywords: power automate returns table to canvas app, return tabular data from power automate to canvas app, canvas app display tabl;e from power autoamte, flow sends table to canvas app, how to display table in canvas app from power automate, power automate and table, power apps and power autoamte table
Id: hcMruU_ME_c
Channel Id: undefined
Length: 14min 37sec (877 seconds)
Published: Sat Jul 02 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.