I still remember the first time I saw Power Automate Copilot, it was at the Power Platform Conference back in 2023, back then it had random compose and did a condition in a loop (a big no no for me).
So 2 years later I thought I would see how much it has improved, does it meet good standards, and would it pass a code review?
Call out, I don't use Copilot in Power Automate, so my experience is limited and my prompts are probably not the best (Though I do use GitHub Copilot and T3 Chat so have some experience in LLMs). Additionally I'm not testing the expression generator, just creating actions.
So the plan is to look at updating a flow with prompted that cover:
- Loops (easy to get wrong and burn API calls)
- Error/Exception Handling
- Conditions (often unnecessary)
And finally a prompt to complete an entire flow.
But erm, this didn't quite go to plan, so there will be a part 2 in the future, anyway let's dive in and see how good Copilot is.
Loop
I start with a manual flow and Get Items:
Prompt: from the get items, if the title includes s, send an email using the text field as the email address
Ok that's not quite what I wanted, SendEmail not Outlook 365 (ok that's me and my poor prompts). But that's just a Get Items and send email, no handling the array, no expressions, not even inputs to parameters.
New prompt, I'm taking Get Items out for a simple array in a compose, and a simpler expression in the prompt, and adding send email from me to make it use Outlook.
if any item in the Array is blank or "" send a email from me to [email protected]
No better, lets go simpler:
find any item in the compose named Array that value is ""
What's that, it says there are 2 loops, but I can't see them on the canvas.
Clicking in the Copilot window opens the actions, again you can see no parameters, so it's just added 2 loops, but I can't see how they are setup (and why it needs 2).
I thought maybe if I save and refresh maybe that will fix it.
What!!!, I didn't ask for send email, it's not in Copilot window, but it's somewhere in flow, just not in the canvas. Ok lets try save as draft and refresh the page.
And now I get an empty canvas....
This is not going how I expected, but it's kind of cool, Im keeping that flow π Lets try I new approach. Starting from When a new email arrives trigger.
find any excel attachments and then send by my office 365 outlook to the following email address "[email protected]"
Where to start, well first I'm happy to see they are using Outlook actions (my prompt skills are improving), but:
- Why can't they use my connection used from the trigger in the Outlook actions
- Why does it get all emails
- Why is there no loop
Better Prompt David:
find any excel attachments from the email that triggered the flow and then send by my office 365 outlook to the following email address "[email protected]"
Score: 0/10, next test.
Error Handling
This time I grabbed an old flow I used to demo 3 different ways to process XML, not really a good choice, but I just want error handling.
add error handling to this flow
So Copilot thinks adding an additional parallel branch scope is error handling (wait they did rename the action for first time, win!). There is nothing in the scope and they didn't even set run after.
Better prompt time:
add error handling that would send a email through office 365 outlook to alert owner in case any of the actions fail
Wait, how, so close. The scope and send email are right, but what does it run after. Man I need to run this flow π€£
Score: 0/10, next test.
Conditions
Setup is simple manual flow with a string input and a Get Items.
if the manual trigger input value = success send a email with subject success, else send a email with subject failed
And again nothing is added to the canvas, but in the Copilot window we can see its add 3 actions. Clicking in on them I see.
- There is nothing in the condition logic
- There is nothing in the subject
So now we can be confident Copilot can only add action or add parameter, it can't do both.
Even though I can't actually test I can see what I wanted. If I had this in a code review I would want one send email and use a if() expression to set the subject, not a condition and 2 send emails. That way you use less API calls and easier to maintain (1 email action to update instead of 2). And it failed.
Score: -1/10
MS Learn
The one common denominator here is me, so lets remove me and my most likely terrible prompts and use Microsoft's.
The Use Copilot in Power Automate Module has some example prompts.
https://learn.microsoft.com/en-us/training/modules/use-copilot-power-automate/edit-flow
Check if the Title property from the trigger includes the word Urgent
The docs says it should, and I quote "This prompt adds a conditional check and configures it for the Title property from the trigger.", well erm no it didn't.
Score 1/10
When Condition is False Send an email that Request has been denied
Well its added it but I cant see it on the canvas.
If I click in the Copilot window I can now see the action sidebar, by setting it up Copilot means do everything, no AI generated body text etc. And why does it default to the Send Email Notification, that Microsoft itself is trying to depreciate.
Score 3/10, it kind of did what I wanted, just buggy and bit pointless as quicker to add it manually.
Full Flow
This time I'm going to use the 'Describe it to design it' option when creating a new flow.
a flow that runs when a email is received, it extracts all powerpoint attachments, if they are already in a sharepoint list it updates the last received column, else it creates a new item with the file as an attachment
Finally I have a flow that I can code review properly. And this is what I found.:
No trigger condition, I would want it only to run if there was a PowerPoint Attachment (it did set only run if attachment, 1/2 point).
The validation check is case sensitive, you should use lower() to ensure match.
They use a condition within a loop, this should have been a filter before.
And there is no error handling, environment variables, naming convention (Condition 2).
Score 4.5/10
Now I know that my prompt wasn't detailed about what I want, but in a real world new users of Power Automate using Copilot would not know to prompt those specific things.
As I said, that did not go how I expected, I really thought it would push working flows that I could review. I will try again in a few months, fingers crossed I can do it properly then. I do wonder if I was unlucky/terrible at prompting, or if anyone is actually using Copilot in Power Automate.
And that to me is the issue, NoCode is designed to solve the same problem as Copilot, so why are we adding Copilot to it, it's like adding a steering wheel to turn another steering wheelπ€¦
I also had some other Copilot Nuggets of Gold:
Filter array for starts with s
Filter array for greater then 4
If you would like to get notified every new blog (I also do a few in the Power Platform Community), subscribe below
Top comments (0)