Create Plugin Actions(preview) with Power Automate in Copilot Studio

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys de Taylor here so in a previous video I showed you how you can create a plug-in action in co-pilot by using a Power Platform connector in this video I'm going to show you how again to create that plug-in action in co-pilot but this time I'm going to use a power automate flow I'm going to get right into it right after this [Music] the first thing that I need to do before I can create a plug-in actions in copilot studio is I need to actually create a power automate flow and I've already done that but I did want to show you real quick what that power automate flow looks like so you can see here that we're starting with this co-pilot skills and this is basically what we saw before when this was still called Power Virtual agents so you're just going to look for co-pilot here this is the data that co-pilot is actually going to pass on to this power automate flow so you see here I'm asking for an email address and then I'm saying please enter your email address after this I'm going to query for contacts in Dynamics 365 and then I only want to bring back contacts where the email address equals the email address that we had in the input in the step above then I have a couple of conditions here so I'm saying here here if the right if the list row actions comes back with an empty statement right so I didn't find anything that's what this means we're saying empty body list row value if that statement is true then it's actually going to compose a message to say sorry we don't have a contact ID for you on file so basically what this means this condition is if the previous step of list rows come comes back with no rows right when the list row action is empty if that is true then I want to compose a message that says sorry we don't have a contact ID for you on file now if I do get rows back then I'm actually going to say let me just move over here I just want to get the value right of that record CU remember we said here that we only want one row to be returned so what we're doing here in this particular section over here we're saying from that list of rows that one record give me the contact ID so that's what you're seeing over here that's all that I'm doing here and then when we go back here to respond to co-pilot what you you'll see there is that we're basically putting both outputs in here right the output of compose 2 and the output of compose one because it's only going to follow one of those paths right either yes or no so now that you have created your power automate flow now let me show you how we can now create a plug-in action in co-pilot Studio now that we are in co-pilot Studio we can go ahead and create that plugin action you can do that by navigating the topics and then you can go to plug-in actions or you can click here on ADD and then you can just click here on plugin action so you can see here that I have a lot of different things that I can use your connectors custom connector skills but like I said earlier I really wanted to show you how how we can create that plug-in actions from a flow so I'm just going to filter out so that I can only see flows now the name of the flow I want to use is this co-pilot check for contact on email so I'm going to click search here and then I should see here here we go this is it check for contact on email and this will now open this window that you see here so here here there's really nothing that I can do right so this is just to show you that you're using this power automate flow so I'm going to click on next and then you can see some other things here right you have some action details which I can edit in here I have my inputs and I have my outputs in here as well so you can like I said edit that you can click on that and make changes or you can just go ahead you can just go ahead and click finish and then go back to that plug-in action and then make those changes however you want to do that so now we're going to click here on plug-in actions and let's just see here this one check for contact on email is the one that I just created so couple of things that you want to do here right so you can see here that the plug-in action name is co-pilot check for contact on email so it's basically just copying over whatever the name of that flow is and if you look here you can see here that this is just the name of this plug-in action and that's just for internal identification right so AI is not really looking at that so I'm going to say I'm going to call this my new plugin check for contact on email okay then the model little display name as you can see here this helps AI determine when to use this tool so if you modify this field it could affect the accuracy of dynamic chaining right that's something that's also in preview but I'm going to talk about that in a later video so again this is kind of you're telling it what it's doing so I'm just going to change this and as you can see here what I'm going to do here is I'm going to change this and say query for contact ID now the model description again helps AI determine when to use this particular plugin right again this also has something to do with that Dynamic chaining but what you can do here is again you can change this right so you can do something very similar here where you can say right we are using this to query for a contact ID or you can just say Okay this runs a query right this is more of a description in Dynamics 365 to find a contact ID then we're going to go into the inputs so this is really right how is the bot going to to fill out this data right so you can see here this is bringing this over from that power automate flow that I just s showed you right the display name in that flow was email and then the description was please enter your email address again right this helps AI determine how to fill out this information now that's the only input that I have in here so I'm going to go to outputs now and from here we can either have if we want to respond to the user which of course we want right otherwise what's the use of them interacting with co-pilot we can actually have ai dynamically generate a message or we can create our own message now if you remember we had two different outputs right we had an output and I'm going to go ahead output um and kind of show you here this is the contact ID output but but where that was coming from I'm going to show you that real quick so let's go back here real quick to that power automate flow so I can show you what I'm talking about so in co-pilot you saw that the output was called output. Conta ID that's coming from this field now I actually have different outputs right as you can see here depending on whether or not this list rows has values in it right so that doesn't really matter the only thing that's important is that contact ID so that we're actually going to submit that message so what I could do here then is I could say let me just remove this real quick your contact ID is and then I can can say output contact ID now the only thing is that if there is not a contact ID this might not look really good so I'm going to change this I'm going to say not available or I'm going to say not on file and then I'm going to go ahead and save that now the next thing that we need to do is go back here into copilot studio and then again we can create a topic here well let's first save this so let's go ahead and create a new topic and front blank and then you can add some trigger phrases here I need my contact ID and whatever other phrases contact ID but whatever phrases you want to put in there then I'm going to add I'm going to call an action here and I'm going to click here on plugin preview again here is my plugin and then all I have to do now or all I want to do now is I want to end my current topic and this is going to be my new topic all right all right now let's take this baby for a spin let's actually close out those properties so I'm going to go ahead and test this so I'm going to enter what is my contact ID and as you can see here it's now responding to me by asking me what is the text now this is not a very clear message right so I Ro have co-pilot ask what is your email address because the end user is not going to understand what co-pilot is looking for now the reason that copilot is asking for text is because the names being used for the flow inputs are stored in power automate and we can't go into Power automate and edit that so that's why you're seeing this now Microsoft is a way A Ware of this and they're working on on fixing this issue so so that instead of what is the text we'll get something like what is your email address so I'm just going to go ahead and enter I'm going to say my email address is anas Smith email.com and then it should there you go it's now giving me back my contact ID but what happens if I actually have right we saw this into flow so I'm G to do this again what is your contact ID I'm going to say Anna google.com which does not exist and there you go your contact ID is not on file but hopefully you can kind of see how this is really GNA cut down on the creation of topics right because this is a very very quick way to create a topic and get all the information that you need from Power automate directly back here to the bot I hope you enjoyed this video and if you did don't forget to hit that like button also don't forget to subscribe so you'll never miss another video again thanks for watching until next time
Info
Channel: D365 Goddess
Views: 2,291
Rating: undefined out of 5
Keywords: Copilot Studio, Flows, Plugin Action, Power Automate
Id: 5y_Pk-axdlw
Channel Id: undefined
Length: 14min 24sec (864 seconds)
Published: Tue Dec 12 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.