Citizen Developer
Timespan
explore our new search
Integrating ChatGPT with Microsoft Power Apps Guide
Image Source: Shutterstock.com
Power Apps
Oct 27, 2023 11:00 PM

Integrating ChatGPT with Microsoft Power Apps Guide

by HubSite 365 about Angelo Gulisano [MVP]

Productivity Solutions Manager presso Npo Sistemi | Microsoft Certified Trainer

Citizen DeveloperPower AppsAll about AILearning Selection

Learn how to integrate ChatGPT with a Canvas App to add AI functionality to your platforms using OpenAI and Power Automate services.

In this comprehensive guide, Angelo Gulisano explores the integration of Power Apps with ChatGPT. ChatGPT is an AI-based chatbot developed by OpenAI that specializes in conversing with humans. The technology can be harnessed to generate content, answer queries, translate, summarise and more.

To utilize ChatGPT, Gulisano outlines that Power Automate will call the ChatGPT service, get a response back and pass it to an App. The process requires a premium license to enable Http Post requests from Power Automate, an account with OpenAI, and a valid OpenAI API key.

In this guide, Gulisano details the creation of a Canvas App that calls for the flow, prompting for desired outputs. For this, he includes the process of HTTP Post request to call OpenAI Service as per OpenAI requirements. This includes the URL, Content-Type, authorization as well as the body which carries the model, messages and temperature.

 

Our expert then parameters the prompt, indicating the potential to parameterize the model or temperature. The action to call ChatGPT from the flow is clarified. He also specifies the extraction of information from body response and passing it back to the app using a JSON scheme.

The "Parse Json" action is generated from a sample, making it quite handy. He also demonstrated how to get the result and dispatch it to your app.

Do you want to get in-depth knowledge about Power Apps? Check out this link for more information!

Afterward, he details the creation of an App for testing purposes. A button was added to call the flow and store result in a variable. Finally, Gulisano shared his completed flow and a snapshot of the completed App.

Read the full article Power Apps – ChatGPT Integration

About Power Apps and AI

Applications like Power Apps are revolutionizing the way organizations function. This low-code platform has simplified and democratized the process of building custom business apps. These business apps facilitate in automating administrative workflows, sharing data across teams, and even as an AI-extension like ChatGPT, to improve customer interaction. The beauty of low-code platforms extends to their flexibility, enabling users to tailor solutions to their specific requirements.

Power Apps - Integrating ChatGPT with Microsoft Power Apps Guide

Learn about Power Apps – ChatGPT Integration

 

This blog post explores the integration process of ChatGPT into Microsoft Power Platform, specifically Canvas App, in order to supercharge the application with AI capabilities. ChatGPT is a model developed by OpenAI, that excels at conversational interactions, making it a valuable tool in a variety of applications such as content generation, translation, text summarization, and sentence completion.

If you need further assistance or guidance on this topic, you're encouraged to reach out to the author. Before beginning this integration process, some prerequisites are required to ensure a smooth progression:

  • A premium or trial license for initiating HTTP Post requests using Power Automate
  • An active account with OpenAI with sufficient credit
  • A valid OpenAI API key

An integral part of this process involves calling the ChatGPT Service via Power Automate. Responses from the service are then sent back to the Canvas App according to a sequence of actions explained further in the post.

The service call begins by setting up a HTTP Post request within Power Automate. OpenAI provides precise instructions on setting the headers of such a request on their documentation page. Critical elements include URL, Content-type, and Authorization fields. The body of the request necessitates a Json object with model, messages, and temperature parameters. An example request is given in the post for further clarity.

The prompt in this example is parameterized, although one is free to parameterize model or temperature as well. Following the service call, the body response needs to be captured, parsed, and results extracted for transfer back to the app.

By incorporating a "Parse Json" action, OpenAI's response can be decoded. The schema provided in the blog helps to define the structure of the Json object to parse it accurately. The first message from the response is then transferred back to the Canvas App, utilizing an expression within the flow.

Once the flow is completed it can be tested from an app. The blog provides a snapshot of a sample app where the Canvas App accepts a user's input and produces an output from the service in response, demonstrating the successful integration of ChatGPT into the Canvas App. All these steps, if followed correctly, should lead to a successful incorporation of AI functionality within a Canvas App.

The author welcomes further discussion and ideas on this topic and can be contacted directly through the provided link. As a Microsoft Power Platform specialist, they are equipped to provide more personalized guidance in this area. The goal is to empower the community with the knowledge and skills to explore AI capabilities in new and innovative ways.

Keywords

Power Apps ChatGPT Integration, OpenAI in Power Apps, Chatbot Integration in Power Apps, AI Power Apps, Power Apps GPT-3 Integration, Power Apps AI chat tool, ChatGPT Power Apps plugin, Natural language processing Power Apps, Power Apps with Conversational AI, Deep learning in Power Apps