Create AI plugin actions for a Microsoft Copilot (preview)

Important

Power Virtual Agents capabilities and features are now part of Microsoft Copilot Studio following significant investments in generative AI and enhanced integrations across Microsoft Copilot.

Some articles and screenshots may refer to Power Virtual Agents while we update documentation and training content.

AI plugin actions can be used to extend a Microsoft Copilot. Alternatively, they can be used within a custom copilot as a plugin action.

You can create multiple types of AI plugin actions in Microsoft Copilot Studio:

  • Prompt actions, which use AI Builder and natural language understanding to target the specific scenarios and workflows within your business.
  • Flow actions, which use Power Automate flows to perform actions, and retrieve and work with data.
  • Connector actions, which use Power Platform connectors to access data from other systems, such as popular enterprise products like Salesforce, Zendesk, MailChimp, and GitHub.

This article provides instructions for creating, sharing, and publishing plugin actions.

After you create plugin actions, enable them for use in Microsoft Copilot, or add them to a custom copilot.

The remainder of this article describes how to create each type of action.

Generate content or extract insights with AI Builder prompts

Note: Extending with prompt actions is only available for some types of Copilots.

To create prompt actions:

  1. Sign in to Copilot Studio and select Library on the side navigation pane.
  2. Select + Add an item. You're prompted to select a Microsoft Copilot to extend.
  3. Select one of the Copilots to extend.
  4. For Copilot for Microsoft 365, you're prompted to choose between extending the Copilot with a New copilot or a New action. Choose New action.
  5. A New action menu appears. Select Prompt.
  6. Enter a Name for your prompt under Prompt details. Use natural language to describe what you want to achieve. For example, Summarize this text as a paragraph with fewer than 50 words. You can also select from several preset prompt templates to help you get started with a prompt. You can then customize the template for your scenario.
  7. Under Input, add variables for any information you want to give your prompt as input. You can define multiple inputs if needed. You can also add sample data for each input variable. For example, if you want a prompt template to summarize a given text, define a text input variable and add a sample text to summarize as a test.
  8. With the necessary variables defined, add an input variable under Prompt for each input that the copilot should provide when invoking the prompt action. You can add more than one variable to your prompt, if you intend to receive more than one piece of context data at runtime from the copilot.
  9. You can also add dataverse table and columns as grounding data for your prompt response. By adding a table and its related tables, you can inform the prompt to use it as reference data to generate grounded responses.
  10. To try specific sample data for your input variables, and click on Test prompt to evaluate how well the prompt works.
  11. Select Finalize prompt to review the details you defined for the prompt.
  12. Finally, select Create prompt action to save your prompt action.

After you create your action, you need to enable it for use in Microsoft Copilot.

For more information about building and using prompt plugins, see AI Builder prompts.

Custom automation with Power Automate flows

Power Automate flow plugins let you define flows that can be called from AI surfaces in Power Platform. Flow plugins use the new Run from Copilot trigger and Respond to Copilot action to define custom processes that can be invoked with natural language.

To create automation plugins:

  1. Sign in to Copilot Studio and select Plugins (preview) on the side navigation pane.
  2. Select Add a Power Platform component as an AI plugin.
  3. Select Custom Automation.
  4. The flow editor automatically opens with the Run from Copilot trigger and Respond to Copilot action present.
  5. You can add inputs to your trigger for information you might want to collect from your users. Provide helpful text descriptions for each input so the AI can correctly identify what to extract from a user's data or inputs. Create Flow Plugin
  6. Add actions to your flow such as the Create an approval and Post a message to Teams chat to create an approval process.
  7. Optionally add parameters to the Respond to copilot action for any output you want to send back to the copilot. Create Flow Plugin Path
  8. Save your flow with a meaningful flow name and test or run it at least once. The AI uses the title and description of the flow to determine when to invoke the flow plugins. Ensure your flows run correctly, as only tested flows show up as available plugins in Microsoft Copilot.

After you create your action, enable it for use in Microsoft Copilot.

Author a Connector action

Connector actions let you define connectors that can be invoked from AI surfaces in Power Platform. For connector actions, you need to identify the actions enabled for use in Microsoft Copilot. You can also capture the information that large language models require to effectively identify and utilize the plugin, such as summary and description fields.

Adding a connector action for Copilot for Microsoft 365

You must have maker level credentials and be assigned a copilot license and a Microsoft Teams license in order to author a plugin action for Microsoft 365.

To add a connector action to Copilot for Microsoft 365:

  1. On the home page, select Copilots.

    Open copilots list

  2. On the Copilots list in the left hand navigation, select Copilot for Microsoft 365.

    Select Copilot for Microsoft 365

    The Copilot for Microsoft 365 main page is displayed on the configure tab.

    View Copilot for Microsoft 365

  3. Select the Extensions tab. You can see a list of the actions already present within the Copilot.

  4. To create a new action, select Add Extension, and then select New action.

    Copilot for Microsoft 365 add extension

    You're provided a list of all supported action types.

    Choose new action type for Copilot for Microsoft 365

  5. Select Connector. You're provided a list of available connectors to select from. Connectors connect copilots to different services. The list includes all certified connectors offered by Microsoft and any custom connectors that are present on the current environment being used. A search bar is available to help find the connector that you wish to use.

  6. Find your connector type using the search bar and select it.

    Choose connector type

    The Action details page is displayed.

  7. Write a name and description for your connector. The connector name must be unique. By default, it takes on the name of the connector type that was chosen. You should add more defining information to ensure it's both a unique name and that it's easy to discern what it does for users who want to enable it later. Consider including in the description the types of actions it allows like "Mail Service – allows you to retrieve and create messages".

    Configure connector basic information

    The description may be provided if present in the connector you selected. The description is used by the Copilot to identify when the action can be used to get responses back for the user request. Make the description as detailed and descriptive as you can. Provide specific details using terms you expect users to use when calling on the action. To continue the Mail Service example above, you may include something like:

    "Mail Service provides the ability to get lists of existing messages, retrieve folders where messages are stored, list titles of messages and folders, get messages, update message titles and bodies, set priority for messages…"

    The more specific and detailed the better. The description lets the copilot know to use the plugin without being explicitly instructed, allowing for a more natural language experience.

  8. Under Solution, a dropdown lists all solutions available within the current environment. Select the solution you want to use. For more information on what solutions are, and why they benefit you, see Solution concepts.

    Select solution

    If you have a preferred solution, or your selected connector is already in the solution, that solution is auto-selected. You can either select a solution, or leave it blank. If you leave the solution blank, a solution is created for you with action name and default publisher. Storing your action in a solution lets you move it very easily across environments.

    Note

    You do not see default solution or CDS default solution as an option in this case as we recommend having a custom solution for easy management. For more information, see: Default solution vs. custom solution.

  9. Once the solution is chosen, select Next.

    The Select Actions page is displayed. This page shows all the actions that are available to add for your connector. You can select and configure the actions you want your copilot to support. A search bar is included to help you find the action you wish to select. There is no limit to the number of actions you can select for the connector.

    Add action to connector

    Note

    Connectors only execute the actions you specifically select and configure here. If an action isn't listed, then it is not available. It's not possible to add or remove actions from a connector from within the Copilot Studio actions wizard.

  10. Using the search bar as needed, find and select an action to proceed. The Configure Action page is displayed.

    Connector configure added action

  11. Provide a name and description for your action. The name doesn't have to be unique in this case. These values are most likely going to be populated for you from the connector. However, as with the connector description, you should provide a detailed specific description so that the copilot knows when to invoke the specific action. The description helps allow a more natural language approach to selecting the action to execute. For example, if an action is "List message folders", you might use:

    "List message folders allows you to get a list of all message folders available from the mail service. This action retrieves all folders, places them into a list view, and returns them to you."

    The action description provides the context clues "list message folders", "get", "all", "retrieve", "list", "mail service", "return", "folders", and "view". Your copilot can use these context clues to identify when the action is the right one for a user request.

  12. When you're done, select Next. The Select action parameters page is displayed. All the inputs and outputs for the action are listed. The inputs and outputs list is provided by the connector and can't be changed. However, the descriptions can be modified. These descriptions have no impact on the copilot. They simply provide clarity for future makers who manage the action.

    Connector action view inputs outputs

  13. Modify the descriptions as you like.

  14. Select Next to proceed.

    The Select Actions page is displayed showing the action you configured.

    Connector select action screen first action selected

  15. Select another action and repeat the previous action configuration steps if desired.

    Alternatively, select Next. The Review, test, and publish your action screen is displayed.

    Review, test and publish the connector

    The Review, test, and publish your action screen displays the details of all of the configuration steps up to this point. You can review the configurations, and then test your action before publishing.

  16. Select your existing connection from the dropdown or select + New connection if you don't have a connection.

    If you select + New connection, a wizard opens where you can add details such as username and password to build the connection.

  17. When you are done, select Test action.

  18. Once you see a message that the action is ready to test, go to Copilot for M365 chat, open the flyout to see the action, and toggle it on.

    The action appears with a beaker icon under the chosen connector with format Test-Action name.

  19. You can now test the action by trying the prompts you expect a user to use. You can also use the –developer on command to get more information on prompt execution. Once you're satisfied with the results, return to Copilot Studio.

  20. Once you are done testing, select Publish.

    A page is displayed showing your connector in the process of being published. Once completed, you see a page indicating that your connector is published.

  21. Select Go To Details Page to see the details of the published plugin.

    Now that your connector is published an administrator must enable it before it can be used in the copilot.

  22. You can also easily move a connector from one environment to another using a solution. To do so select Export this solution on the details page. Exporting the solution lets you export the connector.

    Export solution

  23. Change the version number if needed and select if the solution must be Managed or Unmanaged.

    • Managed means you don't expect to have to make further changes to the solution
    • Unmanaged means you want to make changes to the solution in the target environment.
  24. On completion you see a green message with option to Download the solution, which saves a .zip file in your system.

    Note

    You aren't required to select Publish in the solutions panel.

  25. Select Import Solution in the Copilot main page in the target environment.

    Import solution

  26. Select the .zip file and proceed. You can see the connector appearing in the Extensions list.