Create a prompt action
In this exercise you will create a prompt action, test the prompt in Copilot Studio, and test the prompt within a Copilot agent. You’ll create a prompt action that helps users turn their raw ideas into organized marketing pitches that follow a specific format and guidelines.
This exercise should take approximately 15 minutes to complete.
Create a custom prompt in Copilot Studio
- Open Copilot Studio in your web browser by navigating to Copilot Studio at
https://copilotstudio.microsoft.com. - Select Tools from the left hand navigation.
- Select New tool.
- On the New Tool popup window, select Prompt. You’re taken to the prompt builder UI. Copilot is available within this window, but we’ll define our prompt manually for this exercise.
- In the textbox at the top of the window, select the auto-generated name and replace it with the name Marketing Pitch Prompt.
- In the Instructions text box, enter
Create a marketing pitch for a product based on a. - Place your cursor at the end of the sentence you entered then select Add content
- Select Text.
- In the Name field, enter
Draft. -
In the Sample data field, enter
The Mighty Mechanical Pencil is new, exciting, and useful. It's not only the first of its kind pencil, but it's fun to use.then select Close.
Test and refine your prompt
- Select Test above the instructions box to test the prompt with the sample data you provided.
- View the output of the test run in the Model respoonse section.
Let’s refine the prompt to create more structured and consistent output.
-
In the Instructions textbox, add the following to the existing instructions to modify the prompt:
The pitch should follow the following Contoso guidelines: - Start with a brief hook - Describe unique value proposition - End with a call-to-action - Use an exciting and influential tone - Select Test again to retest the prompt.
- Notice how the response differs.

- Select Save to save the prompt.
(Optional) Add a prompt action to an agent
If you’ve completed the previous lab and created a declarative agent, you may add this action to your agent and update the agent’s instructions to reference the action.
Add the prompt tool
- From the sidebar in Copilot Studio, select Agents.
- Select Microsoft 365 Copilot.
- Under Agents, select the Product Support agent you’d like to add the action to.
- From the Tools section of the page, select Add tool.
- Select the Prompt filter.
- Select the Marketing Pitch Prompt tool.

- Select Add and configure and wait for the tool to be added. The tool is now listed in the Product Support agent’s Tools.

Update the agent’s instructions and starter prompts
Update the agent’s instructions to provide guidance for using the prompt.
- In the Instructions text box, add the following to the existing instructions text and then Save your changes:
Use the Marketing Pitch Prompt tool to craft pitches for products that follow Contoso guidelines based on users' draft ideas. - In the Suggested prompts section, replace the Eagle Air suggested prompt with the following suggested prompt and then save your changes:
Marketing Pitch:Create a marketing pitch following Contoso guidelines based on the following draft:.
You’ve completed the exercise and created a prompt tool for your agent.