How to Use Prompt in Power Apps? [With Examples]

Power Apps now lets you integrate AI-powered prompts directly into your apps using the Prompt (AI capability). This feature makes it easy to collect input from users in a more interactive and dynamic way. You can configure it to accept free text, ask for a file upload, or even guide users with context-aware suggestions.

By connecting your prompt to an AI Builder model or a custom prompt, you can automate user input collection and enhance your app’s experience, without writing complex logic.

In this tutorial, we will see how to set up and use the Prompt effectively in Power Apps, with examples that cover both text-based and file-based inputs.

In this Power Apps tutorial, I will explain:

  • How to add a Prompt in Power Apps
  • Two real-world examples:
    • Uploading a file and extracting file details
    • From the issue description, get the priority level and the expected resolution date using a text-based prompt

Add Prompt in Power Apps

Before you use the Prompt control, make sure you meet these requirements:

  • You must be using a Dataverse environment.
  • You need the AI Builder license.
  • Make sure AI Builder is enabled in your environment.
  • Create a prompt in the Power Apps Prompts tab.

Example 1: Upload a File and Get File Details in Power Apps Prompt

Suppose your Power app lets users upload an invoice file. After uploading, you want to capture key details such as the name, invoice amount, and item description directly in Power Apps using AI.

To achieve this, we can use a Custom Prompt with AI Builder.

Create a Custom Prompt in AI Builder

  1. Go to Power Apps -> Prompts tab. Click on Build your own prompt.
How to Use Prompt in Power Apps
  1. A new window opens where you can define how Copilot should interpret the user’s input.
Use Prompt Control in Power Apps
  1. Prompt Name: Extract Invoice Details
  2. Instruction to Copilot (Prompt Instruction Text):
You are given the content of an invoice Document input . From this, extract the following details:
- Name
- Invoice Amount (only the numeric value)
- Item Description

Return the result in the following format:
Name: [value]
Amount: [value]
Item Description: [value]
  1. Click Save.
Power Apps Prompt Control Tutorial

Add Prompt Control in Power Apps

I have already created a Power Apps screen where users can upload a file to SharePoint. You can refer to the screenshot below to see how the upload functionality looks:

Prompt Feature in Power Apps Explained

Now, Follow the Steps Below to Add Prompt:

  1. Open your Canvas app in Power Apps Studio. Click Data -> select + Add data.
Using AI Prompt in Power Apps
  1. Search for your custom prompt and click it.

The following example shows a custom prompt named Extract Invoice Details.

Add Prompt to Power Apps Screen
  1. Now, add a Text label to display the parsed results.
Enable Prompt in Power Apps Form

You’ll now be able to use the prompt like a function in Power Fx.

  1. Select the Button, and in the OnSelect property, add:
Set(varInvoice, 'Extract Invoice Details'.Predict(First(attch_1.Attachments).Value))

Replace attch_1 with the name of your Attachments control.

Prompt Input Power Apps AI Capability
  1. Add a Label and set its Text property to:
varInvoice.Text
Power Apps Prompt AI Builder Integration

This will show the full formatted response, such as:

Power Apps Prompt Use Case Guide

Now your Power Apps screen can intelligently read uploaded files and pull out structured data, all using natural language and AI.

Check Out: Create Multi Agent in Copilot Studio

Example 2: Extract Priority and Resolution Date from Issue Description using Power Apps Prompt

Here’s how to set it up in Power Apps using a Custom Prompt and simple logic.

Create a Custom Prompt in AI Builder

  1. Go to Power Apps -> Prompts tab.
  2. Click on Build your custom prompt.
  3. Use the following:
    • Prompt Name: Extract Issue Priority
    • Prompt Instruction:
You are given an issue description as input Text input . From this, extract the following three pieces of information:
Summary of the issue: A short sentence that describes the main problem.
Priority level: Based on your input, please assign a priority level of High, Medium, or Low.

Output your response in the following format:

Summary: [value]  
Priority: [High/Medium/Low] 
  • Click Save.
Step by Step Use Prompt in Power Apps

Now, Follow the Steps Below to Add a Prompt:

  1. Go to Apps and open the Canvas app where you want to use the prompt.
  2. In the left panel, click “Data” (database icon). Click “+ Add data“.
  3. Search for your custom prompt by name: Extract Issue Priority.
Prompt Control Power Apps Example
  1. Add a Text Input (Name it txtIssue)

This is where the user will type the issue description.

  1. Add a Button:
    • Rename it like “Analyze Issue”
    • Set the OnSelect property to:
Set(
  varIssueOutput,
  'Extract Issue Priority'.Predict(txtIssue.Text)
)
  1. Add a Text Label in the text property to:
varIssueOutput.Text
Power Apps Prompt Feature Overview

Output:

Text Input Prompt in Power Apps

Conclusion

In this tutorial, we explored how to use the new Prompt control through two practical examples: parsing invoice details from a file and determining issue priority based on user input. With just a few steps, you can integrate AI into your apps and significantly enhance the user experience.

Also, you may like some more Power Apps tutorials:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App