Edit a flow with Copilot
Copilot for Power Automate helps you create your flow and continues to work with you as you build and refine the automation. You can use Copilot during the editing session, regardless of whether you used Copilot to create the flow or not.
You can ask Copilot to help you with many tasks, including:
Adding or removing steps in your flows.
Replacing triggers or actions.
Modifying parameters on your flow steps.
Explaining what your flow does.
Explaining how to do something in a cloud flow.
The image above depicts how Copilot removed Condition 2 and adjusted Condition to work without a previous action being in the flow.
Copilot acts on your behalf to build what you request in your prompts. However, if the results aren't what you need, you can use the Undo option to return the state of your flow to its state before the previous prompt. If Copilot added new connections as part of the step that you undo, the undo action also removes those connections.
This Undo action returned the removed Condition check and adjusted the other condition to run after it.
Copilot can also explain what the flow does. For example, if you enter "What does this flow do?" as the prompt, Copilot would provide the following summary:
This flow retrieves a message with the keyword "#specials" from a specific channel in Microsoft Teams. It then lists records from an entity called "contoso_specials" and creates an HTML table with the special name, description, and price. Finally, it posts the table as a message in the same channel. If there are no records, it posts a message stating that there are no specials available.
Copilot can also explain what an action in the flow does. For example, you can enter "What does the trigger do?" as a prompt.
You can also ask the copilot how to accomplish a task. For example, you could ask "How can I get the current date?" In response, Copilot provides the steps for using the utcNow() workflow expression.
Build prompts
To get the best results from Copilot, you need to build prompts that can help it be successful. Make sure that you remove ambiguities that might lead Copilot to act on the wrong step. For example, if you enter "Change Compose input to be Test" as the prompt, Copilot would need to pick which Compose step to use in your flow if you have multiple Compose steps. A more specific prompt, such as "Change Compose2 to test," would guide Copilot to a specific step and a specific property.
You might try the following sample prompts when editing a flow:
Add an action [Action Name]. For example, "Add an action Get My Profile."
List Accounts and check if at least one row is returned. This prompt adds a Dataverse List row action and a condition to check for returned rows.
Move [Action to move] [before/after] [Other action name]. For example, "Move Compose before Get My profile."
Check if the Title property from the trigger includes the word Urgent. This prompt adds a conditional check and configures it for the Title property from the trigger.
When Condition is False Send an email that Request has been denied. This prompt adds a Send an email action inside of the false condition named Condition.
Check if Credit Limit from each Account is zero if so update credit limit to be 50000. This prompt is an example that follows List rows on the Accounts table. It adds Foreach to check the credit limit and a Dataverse Update row to modify the value if it's zero.
Verify added or modified actions
After Copilot processes your prompt, you should review and verify the changes. Copilot indicates what actions are modified and what actions are added. It politely prompts you to "Check these actions to see if any parameters need to be set." The following example shows the response from Copilot.
Copilot doesn't tell you the exact changes to each step, so it's a good idea to review each modified action.
If you find a problem, you can change the action. If the action is wrong, you can undo it. You can undo the results of your prompt until Copilot processes another modification prompt.