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

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

  3. The Copilot main page is displayed on the Configure tab. From here, you can see a list of the actions already present within the copilot if you select the Extensions tab.

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

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

  6. You're provided a list of available connectors to select from. 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. Find your connector and select it.

  7. The Action details page is displayed. Write a name and description for your connector action. The action name must be unique. By default, it takes on the name of the connector 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”.

    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. This allows for a more natural language experience.

  8. Under Solution, select a solution where the plugin is stored. For more information on what solutions are and why they benefit you please see Solution concepts. The dropdown will list all solutions available within the current environment. Select the one you want to use.

    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 it blank a solution is created for you with action name and default publisher. This ensures that your action is always stored in a solution so that you can move it very easily across environments.

Note

You won't 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.

  1. When you're done, select Next.

  2. The Select Actions page is displayed. This page shows all the actions that are available for the connector. Any or all of the actions can be configured for use. 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 plugin.

    Note

    Only the actions you select and configure will be able to be executed by the plugin. Even if they're listed as available, if they aren't configured they won't work in the plugin. If an action isn't present, then it can't be used. It's not possible to add or remove actions from a connector from within the Copilot Studio actions wizard.

    Select an action to proceed.

  3. The Configure Action page is displayed.

    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 plugin description, you should provide a detailed specific description so 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 retrieves all folders and places them into a list view and return them to you."

    This ends up using the context clues “list message folders” as well as: get, all, retrieve, list, mail Service, return, folders, and view.

  4. When you're done, select Next.

  5. 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.

  6. Users can either click Next or Skip optional steps.

    • Next takes the users through steps for adaptive cards and conversation starters. If you want to use those then use the Next button. Continue to step 19.
    • Skip optional steps bypass these steps and take you to the end of the wizard where testing and publishing occurs. You can complete skipped pages at any time by editing the plugin. If you choose to skip configuring these steps at the present moment, proceed to step 30.
  7. Click Next

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

  9. You can select another action and repeat steps 10-15 or you can select Next if you are finished adding actions.

  10. The Review and Test screen is displayed. The page displays the details of all of the configuration steps up to this point. You can review them, and then test your action prior to publishing.

  11. Select your existing connection from the dropdown or create a New connection if you don't have any connection.

  12. On selecting New connection, a wizard opens where you can add details such as username, password, and so on to build the connection.

  13. Once a connection is defined, select Test. Once you see message that it is ready to be tested with go to Copilot for M365 chat. Open the flyout to see the action created and toggle it on.

  14. The action appears with a beaker icon under the chosen connector with format Test-Action name. 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.

  15. After you've completed your testing, select Publish.

  16. A page is displayed showing your action is in the process of being published. Once completed, you see a page indicating your action is published. You can select Go To Details Page to see the details of the published action.

    Now that your action is published it must be enabled by an administrator before it can be used in the copilot.

  17. You can also easily move an action from one environment to another using a solution. To do so select Export on the Export this solution page. Exporting the solution allows you to export the action. Change the version number if needed and select if the solution must be managed or unmanaged. Managed means change has to be made and unmanaged if you want to make changes to the solution in target environment. On completion, you can see a green message with option to Download the solution and save it as a .zip file in your system.

    Note

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

  18. Select Import Solution in your target environment. Select the .zip file and proceed. You can see the imported action in the list.