CRM Crate

Create a Custom Prompt in AI Builder & employ it into Power Apps

In this blog post, we will learn to create a Custom Prompt in AI Builder & integrate it into Power Apps / Canvas Apps. Prior to commencing, ensure to register with CRM Crate to remain informed within the realm of Power Platform.

Create a Custom Prompt in AI Builder & employ it into Power Apps

Using AI Builder, a functionality within the Microsoft Power Platform, you have the capability to develop and employ AI models tailored to enhance your business procedures. You have the option to utilize a preexisting model suitable for numerous standard business scenarios, or craft a personalized model to align with your specific requirements. AI Builder facilitates process automation and facilitates data-driven insights extraction within Power Apps and Power Automate, empowering your business operations. Below is the Microsoft’s AI Builder offers a no-code AI Cheat Sheet which you can use for designing AI Builder solutions.

What is a Custom Prompt in AI Builder?

Custom prompts empower developers or makers to direct the GPT model to act in a particular manner or fulfill a specific objective. Crafting a custom prompt enables the generation of responses tailored to your unique business requirements. This adaptation turns the GPT model into a versatile tool which is capable of addressing a multitude of tasks.

Prompt engineering aims to create clear and specific instructions for the GPT model. By being very specific about what you want, you can get better and more relevant responses. Make sure your prompts stick to one topic and clearly express what you’re asking for.

The custom prompt has two parts; one is the “Instruction” and another is the “Context” as shown below.

Create a Custom Prompt in AI Builder & employ it into Power Apps
  1. Instruction: The instruction is the first thing you tell the GPT model to do. It should give clear directions, like “Summarize the text in bullet pointers”.
  2. Context: The context is the next part of the prompt. It should give the GPT model the details it needs to give a good answer.

What can you build with AI Builder Prompt?

AI Builder prompts are the key to many AI solutions, depending upon what you need to solve. Below are the six common use-cases of prompts.

  1. Classification of text: Which category does this “blog” belong to: technology, lifestyle, or learning?
  2. Sentiment analysis: Is this customer review positive, negative, or neutral?
  3. Rewriting content: Rewrite this technical document in simpler terms for beginners.
  4. Summarize information: Summarize this article in a few paragraphs.
  5. Extract information: Find the main event date and location in this news report.
  6. Drafting a Response: Draft a reply to this customer’s complaint about delivery delay.

How to create a Custom Prompt in AI Builder & integrate it into a Canvas App?

The prompt builder lets you create your own custom prompt by setting input variables. This allows you to include content that changes during use. You can check how well your instructions work using “Test your prompt” feature before using them in your business applications.

Follow the below steps for building a Custom Prompt.

Step 1: Login into your platform

  1. Sign in to Power AppsPower Automate, or Copilot Studio using a valid credential.
  2. In our use-case, we will be sign-in into Power App Maker Portal (

Step 2: Open AI Builder

  1. Within the Power App Maker Portal, navigate to the left hand menu and search for a tab named “AI Builder”.
  2. If you do not find this tab, then click on the three dots and select the “AI Builder”.
Create a Custom Prompt in AI Builder & employ it into Power Apps

Step 3: Build a Custom Prompt

  1. Within the available AI Prompts, select “Create text with GPT using a Prompt”.
  2. Here, a pre-populated custom prompt demonstration template will be popped up. Click on the button “Create custom prompt” for proceeding ahead.
  3. Now you need to build a prompt by adding a pre-defined instruction message. In our case, the instruction message is “Summarize the text in bullet pointers”. This instruction is suppose to convert a text format from a paragraph to a bullet pointer .
  4. Then, for adding a context to the prompt, click on the button “Add Dynamic Value”. This will add a dynamic variable / context to your prompt text.
  5. Once done, you can test the AI output in the “Test your prompt window”.
  6. Click on “Save custom prompt” once the configuration is completed.
How to create a Custom Prompt in AI Builder?
How to create a Custom Prompt in AI Builder?
How to create a Custom Prompt in AI Builder?

Step 4: Integrate a Custom Prompt into Canvas App

  1. Once you create a custom prompt, the next step is to deploy and integrate the custom prompt into a business application. In our case, we will use the custom prompt into a Canvas App where we will receive an text input from the user and generate AI based output using our custom prompt.
  2. Sign-in into Power App Maker Portal ( with valid credentials.
  3. Create a new Canvas App or open any existing Canvas App.
  4. Navigate to Data >> AI Models, select your newly created custom prompt from the populated list of AI Models.
  5. You can use the given Power FX formula which will invoke the custom prompt by passing the input parameter as prompt variable and store the response from the prompt into a variable:
    Power FX – Set(aiOutput, ‘CRM Crate Custom Prompt’.Predict(TextInput.Text));
custom prompt canvas app

The below animation demonstrates the working of Custom Prompt in a Canvas App.

5 1 vote
Article Rating
Notify of
Inline Feedbacks
View all comments
error: CRM Crate Security Engine - Disabled Right Click & Selection!


Well Done,
Welcome to CRM Crate

Stay tuned with us and get all latest updates and learning in Microsoft CRM and related techonologes.