COPILOT, my Precious: Steering the Ship with Gandalf as Your First Mate
Tags: powerfuldevs, coding, ai, powerplatform
Published: 2023-10-17 19:37:28

**Introduction**:
In the realm of software development, as AI-generated code strides into the spotlight, a journey of epic proportions awaits. Picture this: you, the vigilant powerplatform citizen developer , must embark on a quest much like Frodo Baggins, the unsuspecting hobbit, did in J.R.R. Tolkien's "The Lord of the Rings." Your companion, the wise and all-powerful Gandalf, is none other than Co-Pilot. It's not about merely following your AI companion's lead; it's about taking the reins, for you must be the pilot when using co-pilot

**Experimenting**:
I want to test how Co-Pilot can help me create an automation that triggers an AI builder when I receive an email with the subject ‘INVOICE’ and an attachment. The first glimpse super promising and exciting. 
![Demo1](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExY3IyaHN0ZGdlOG83MzNzZDQ3Z2tkNWZvc3hxMDh6aWl3OHZ5M3FtbiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/WRZ5kfSeCmJ0GpYzTl/giphy.gif)

The inquisitive spirit of Frodo Baggins within me, the developer's side, led me to delve deeper into the flow generated by co-pilot. As I explored the flow, I quickly discovered a few aspects that I might not have explored otherwise.

1) The Trigger for the cloud flow was not configured in optimized manner. As a developer would have always picked email with attachment and always used attachment to build the subsequent steps of automation. The filtering criteria was not considered by the Co-Pilot

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kzk3dcilkg6hu7yn7ozl.png)

2) Redundant step added to the automate by the co-pilot. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pr1yfpg0opj3jlxvfuvd.png)

3) The name of the flow is the actual prompt. Would have be nice to get recommendation  and use the prompt as a starting point for the description

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9nhf3cngo5scjqn13ihw.png)

4) The frustrating aspect was that the flow had been created, yet there was no option to save or edit it. The default environment did not grant privileged access to modify the newly generated flow
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/32hgxc1sf17egz132t5s.png)

As a low code developer the practice should be to use Co-Pilot editor to edit the flow. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wdx7r0wybcktxazflnef.png)

**The Unwritten Chapter**:
**Co-Pilot** can be a powerful ally, swiftly generating code. However, like any trusty companion, it has its quirks. Due diligence is essential to ensure the quality of the code. Remember, **_you are the Pilot_**, steering the ship through the vast code seas


**Inspiration**:

1. @wyattdave Autopilot [blog](https://dev.to/wyattdave/power-platform-more-autopilot-than-copilot-24lh)

2. @wyattdave Power Automate [DesignSeries](https://dev.to/wyattdave/series/21919)

3. Linking to previous experiment [Effective questioning](https://dev.to/balagmadhu/beyond-answers-the-power-of-effective-questioning-3i54)