✨ Create a Copilot-Like AI Text Enhancer Component for Power Apps
- Arnaud LG
- Jul 21
- 5 min read
Supercharge Power Apps with Generative AI

📌 Power Apps & AI Expectation and Challenge
With the rise of generative AI in productivity tools like Microsoft Outlook and Word, business users have come to expect smart assistance everywhere—even inside custom-built apps. Imagine being able to enhance a message, rewrite a summary, or polish user input directly within your Power App.
But here comes the challenge: Power Apps does not natively offer a “Copilot” button for every text box or context. While generative AI services like Azure OpenAI or Microsoft 365 Copilot can be integrated via Power Platform, the path from idea to polished user experience involves thoughtful architecture, clever UI design, and reusable components.
In this article, we show how to build a custom Power Apps AI Text Enhancer Component that mimics the Copilot text enhancement behavior in Outlook, and provides a plug-and-play experience for reusability across apps.
💡 Business Value of Power Apps AI Text enhancer component
Enhanced User Productivity: Enable users to improve the quality, tone, and clarity of their content without leaving the app.
Standardized Messaging: Ensure brand-consistent and professional communication in all user-generated content.
Reusable & Scalable Design: Build once, reuse everywhere. The component can be dropped into any Power App with minimal configuration.
Seamless AI Integration: Leverage Microsoft’s AI ecosystem securely through Power Automate and AI Prompts.
No Code for Business Users: Let users benefit from AI without needing technical knowledge or prompt engineering.
🔍 How CoPilot-like text enhancer component Works
At a high level, the Power Apps AI text enhancer component is composed of:
A Custom Power Apps Component to manage the text input UI and user interaction.
A Power Automate Instant Flow triggered from the component to handle the AI logic.
An AI Prompt (Preview) resource in the Power Platform that defines the context and intent.
A smooth connection between the component and the AI flow to “do the magic.”
UX Behavior:

Input some text and click on "AI Enhance icon": This trigger the flow passing the component prompt header property value concatenated to the text from the input box and activate the spinner
The Spinner still active will the flow is running (usually a couple of secondes) and then once the flow is completed, hide the spinner and render the proposed enhance text in the input box.
Click on the thumb up accept the proposed AI enhance text and set the component property Text value to the proposed text.
Click on the thumb down reject the proposed AI enhance text reverting the input box value to its initial value.
🧠 High-Level Architecture

Power Apps Canvas App
--> Custom Text Enhancer Component (UI/UX) |
--> On Enhance → Triggers Power Automate Flow
--> Flow Uses AI Prompt (Preview)
--> AI Model Returns Enhanced Text
<-- Replaces Input With Enhanced Version
✏️ Step-by-Step Implementation
1. Create an AI Prompt in Power Platform
Go to https://make.powerapps.com → AI Hub → AI Prompts (Preview)Create a new AI Prompt with:
Inputs: The text to enhance + optional tone (e.g., professional, friendly)
System message: Guide the AI on how to behave (e.g., “You are a writing assistant that improves grammar and tone…”)
Output: Enhanced version of the input text
✅ Tip: Test the prompt directly in the AI Prompt Studio to ensure it behaves as expected.
2. Create a Power Automate Instant Flow
In Power Automate, create an Instant Cloud Flow triggered by Power Apps.
Steps:
Receive the input text and tone as parameters from Power Apps.
Call the AI Prompt using the "Run a prompt (AI Builder)" action.
Return the enhanced text to Power Apps using the Respond to Power Apps action.
🛡️ Make sure you handle empty or large inputs gracefully and return user-friendly errors if needed.
3. Create the Text Enhancer Component in Power Apps
Open your Canvas App and create a new Component called CopilotTextEnhancer.
Include:
A Text Input Box (InputText)
A "Copilot" Icon Button (btnEnhance) to trigger enhancement
A Loading Spinner or Overlay while waiting for the flow
A hidden output property (EnhancedText) to capture results
Add logic inside the component to:
Trigger the Power Automate flow on button click
Pass the current text input and tone (optional)
Replace the text with the enhanced version upon flow completion
🧩 Consider exposing a property like PromptContext to allow the component user to define context dynamically (e.g., "this is a sales pitch" vs "this is an HR email").
4. Connect the Component to Power Automate Flow
From the component code on the 'OnTrigger' event, call the flow using:
//Call flow to enhance text
UpdateContext({_TextEnhanceFlow:'AIEIT-GenericTextEnhancement'.Run(Prompt)});
If(
_TextEnhanceFlow.succeed=true,
//If Flow Succeed set the proposal
UpdateContext({_DefaultProposal:_TextEnhanceFlow.enhancedtext}),
//Else notify user with a warning that th flow as failed
Notify("Failed to get an AI Proposal for enhancing your text: "&_TextEnhanceFlow.errormessage,NotificationType.Warning)
);
Reset(AIE_TextInput)
On completion, update the InputText.Text with the result.
🧪 Use Concurrent() or Set(loading, true) patterns to keep the experience smooth and responsive.
🎁 Download the Reusable Component Solution
Can’t wait to get your hands on the good stuff? We get it — some people meditate, others click “Download” like it’s a reflex. If you're here to skip the theory and jump straight into Power Platform wizardry, you're in the right place.
This component is ready for action — no fluff, no drama, just pure low-code magic. Plug it in, test it out, and pretend you totally read the implementation guide (we won’t tell).
We’ve packaged the component into an unmanaged Power Platform solution for easy re-use.
Once imported:
Add the component to your app
Configure the Prompt Header of the component for AI prompt reference and optional tone
Start enhancing texts across your business apps
Pre-requisites to deploy the solution:
✅ 1. Environment Requirements
Dataverse must be enabled in the target environment.
The environment must be in a supported region where AI Builder is available. ➤ Check supported regions for AI Builder
✅ 2. Licensing
AI Builder credits must be available in the target environment.➤ Needed for form processing, prediction, classification, etc.
If using custom Copilot or generative AI, you need:
Power Apps/Power Automate with Premium license
Azure OpenAI Service or Copilot Studio if going beyond basic AI Builder
✅ 3. Security & Permissions
User deploying the solution needs:
System Administrator or Environment Maker role in the target environment
Access to AI Builder admin roles if AI models are included
✅ 4. AI Features Enabled in the Environment
Make sure the following are enabled:
AI Builder service principal
Relevant plugin steps and processes (can be disabled by default in new environments, e.g. Train, Predict, AnalyzeSentiment) ➤ Enable AI Builder plugin steps
✨ Closing Thoughts
With just a few hours of work and no code, we’ve turned Power Apps into a smart writing assistant, capable of improving communication and saving time. By combining Power Apps, AI Prompts, and Power Automate, we bridge the gap between generative AI and day-to-day business tools.
This pattern can easily be expanded to:
Translate content in multiple languages
Rewrite based on target audience (e.g., executive vs. technical)
Summarize long form inputs
✅ The future is AI-assisted—and you just brought it into your custom app.
If you want help implementing this or expanding to more AI-enhanced components, feel free to connect with our team.
Opmerkingen