Power Automate - How to Create custom connector

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone welcome back to the channel so in today's session we are going to talk about how we can create custom connectors under power automate so at times you may require to create custom connectors where possibly you may want to connect to some api or some data in your on-premise data center and as well as sometimes you need to create a custom connectors to connect some apis which are outside which for which we don't have any connectors as of now for example you're a finance company and you want to fetch the stocks data from morningstar so let's say you have your subscription added with morningstar as an organization and you want to fetch the stock data from morningstar only like not the whatever connector the microsoft is giving so for that scenario we have to create the custom connectors so in this session we are going to take a look at step by step process how we can create custom connectors so i am in under my power automate screen so if you go to the connectors on the left of navigation so you would see all the connectors which are available over here and if you would like to click the custom connector then you have to go to open this data and under custom connector you have to click on this so this is this will give you a area where you will you can see all your connectors created so for demo purpose i'll be actually using this weather api.com and which gives me the weather data related to any of the city so i'll be just passing the city as an parameter to the request query and i'll get the data or the weather report for that specific city and the authentication we are going to use is this key authentication so we are going to use this api key so this is just for demo purpose i because i could not connect to on my onto my data of my company and can't have that on my test environment that's why i'm skipping that part but this the same steps would be followed if you would like to connect to your on-premise any apis or data so i'll be keep telling you like what you have to do like to make a connection to a compromised data center so let's just get started so i am over here i am clicking on this create from blank and under this i can just give a my this connector a name so i'll just say weather connector continue and on this general screen so you can just upload your icon image or like you can set up your background uh color as well so i'm just skipping for the demo purpose i'm just saying there's a there's a weather connector to fetch leather data and now if let's say let's say if your company has already created uh some api uh let's say this connector is for fetching sales report and uh there is a some different team which have created some apis within your data which decides within your data center so then you have to click this on on connect y optimize gateway and in later later steps when you are going to create the definition it will ask for the connection how you would like to create or make a connection to your on-premise data gateway so you have to choose the selector and in my past videos i have already told you like how you can install the on-premise data gateway is straightforward process you can just download the on-premise data gateway exe from microsoft site and have that installed any of your windows server which should meet the few requirements of dotnet version and if you have those requirements in place then it just quickly click nest and everything would be set up so this compromise data gateway process setting up like this is pretty straightforward and for our demo we are not going to use this on-premise api so we i'm just like using this public api so i'll just skip this uncheck this connect way part and i'll be using the https schema and if for example if you're on premise gateway if you have your apis working on http not https then you can just you have to select this http so i'm just checking this https for us now i have to provide the host name so as i said i will be using this api and the url would be constructed in this fashion for example apigee.com the current json and the key this would be the key so we are going to use the key authentication so at that time we are going to pass this key and in queue query is london so this query is a parameter so i'm just like copying the host name from here and putting the host name over here so next step is to provide the security i mean like authentication type for you this connector so as i said we are going to use this k api key authenticator for this and you have to pass on the parameter if you read out like user will be required to provide the api key event while creating a connection so i'll be just saying key and parameter name would be key as well and instead of like passing that parameter location as header i'll be choosing query and the reason is because i am just passing my que uh this key under the query so if your connector if your this api connection wants to provide that key under the header part then you have to choose that parameter location as header so right now it's just query i'm just choosing that and if i go to definition now here comes like where we actually provide the actual action and the end points so on this screen we have to create a new action and under this summary so this action would be displayed in your ms flow like while you would like choose this action so i can just say uh somebody is like get weather data and in description you can just provide get weather data based on city and or location so this is just normal description and under this unique operation here you have to provide like what action name would be there so it's a get weathered by city let's see so i'll just choose this one and under the visibility you can just have none like for default so you can just skip that part and after this request you have to like create this request parameter so i'll just choose import from sample and under sample i'll be using work get because it's just a cat command i'm just getting it and i'll just put up this entire url under my this url so you can see that key part you can just remove this key part because we are providing that key part as uh this parameter api key parameter which is which is under a security part and the authentication so we can just skip this so now this queue london would be just the parameter and if you would like to pass that as a parameter under action you have to use the curly braces so you can just simply now can do import and once you import you can see this url is this one and part because we don't have any forward slashes like going forward for this path so that's why it's planned and under query we have this query so let's say like uh your query contains path for example if i just go to notepad for example your query just takes city name as in path so so for this you have to like choose you have to like uh go to your import from sample and at that url you have to like use in this fashion so i'm just telling you so that if your query does contain a parameter as path in that case like what you have to do you have to like do this q so if you click on this it will just add up this path so now we have that parameters path so that's how you can do it just like for your information i'm delete deleting it and then just creating importing from sample again so that we can have the right query in place copying this entire removing this authentication part from url now we have this okay so now i'll just going to save my connector so in next tab if i just go to code preview uh it code review like it it will say that uh what actual script base it has created you can disable this as well and can start can if you have multiple actions then you can choose up your actions to look at this code what code has been created for that specific task and as well as like if you have custom connector created by c sharp then you can just upload your c sharp file over here and it will read up these script bases from there so right now we are not going into that c-sharp coding stuff that is for complex connectors i'll just skip that part for now so in next step we can test it but it's saying you must create the connector before testing so i just click on create connector so so it's saved now so now we can test and before test we have to create that new connection so i said while creating this in the general tab that if you are checking that connect to on premise gateway then over here it will be asking to you pick your gateway name which is already installed so right now we are not using any gateway it's a public api so i'm just clicking on new connection it opens up a new tab now over here i have to provide my this subscription key or this normal api key so i'm just copying and going under this and create connection so now because it's disabled we have to refresh it so that it can start showing me my weather connector so it's there now for test operation i can just pass on the city name and just click on test operation so let's see if it gives us a result okay so we got status as 200 that means success and we got this entire json as an body so we are we have successfully created this connector we are ready to go to use it in the microsoft flow so i'm just closing it it's saying this connector has been created so i'll just go to my flows and we'll create one instant cloud flow i'll choose the trigger as manual because because i would like to just test it so in the new step so as you know like i have created my action with weather or get weather so it's still it's not available so i'll just refresh so it takes a while okay so when i start typing as weather it has started giving me this weather connector so sometime it happens like you have to update your connector once again like after doing the test operation because it actually saved that connection part as well so once you do the update connector then it should start appearing over here when you type in or it can if you click on this custom it will show you up to your custom connector so it has it does has this custom action at weather data and as you see like it's asking for parameter so you can just put in parameter and and when i entered this london city so probably you can just pick that up from any of the different trigger for example sharepoint list item and you can just do that dynamic operation and when when you save it and run it it's manual trigger right now so i'm just running from here itself so it should run let's see it ran successfully and under our output we can see we got this data the name is london which we have passes parameter this entire everything is over here like condition is partly cloudy you can just pick out the pressure humidity and everything like you got your weather report like for that specific city so that's how you can create your custom connectors and once the data is available you may use partition or compose actions to filter out the data whatever you want to do so this was end to end process for any on premise data apis data data abs you can use the same way you have to just use the connectors on premise gateway that's it every entire process is same so i hope while working with the internal apis or public apis as well with the connectors which are not there not provided by microsoft you can create your own custom connector so if you like this video as useful please drop your comments to like and subscribe my channel i
Info
Channel: M365 Tech Help
Views: 1,101
Rating: undefined out of 5
Keywords: Power Automate Custom Connectors, Create Custom connector in Power Automate, Create custom connector in MS flows, Consume custom API in PowerAutomate, Work with custom APIs in Power Automate, Work with on premise APIs in MS flow, Create custom connector for your API in MS flow, Power Automate with Custom APIs, Power Automate with Custom Connectors, On-Premise connection in Power automate, Connect On Premise API in MS flow, Connect On Premise API in Power Automate
Id: Jfk_cqvvtIA
Channel Id: undefined
Length: 14min 37sec (877 seconds)
Published: Sat Aug 28 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.