Learn how to send and receive data from ChatGPT using Power Apps. We explore additional use cases that ChatGPT can help you build Power Apps faster and more efficiently.
What is Chat GPT?
Chat GPT (Generative Pre-trained Transformer) is a Natural Language Processing chat bot that’s taking the internet by storm. It’s an advanced Artificial Intelligence (AI) algorithm that synthesizes information into incredibly useful results. Its current publicly available version of GPT3 was trained on a massive dataset on a broad range of topics across the internet and other sources. The software is able to answer a wide range of questions with answers on par with what a human might tell you. Beyond question answering, it can generate written content and even write Python, Dax, M, SQL and other types of code!
If you’d like to give it a try, you can check out the free research preview available from it’s creator OpenAI.com
Microsoft Power Apps and ChatGPT Integration
To be completely honest, adding an API connection for ChatGPT to PowerApps is not as straight forward or low-code as many people might lead you to believe. There are many different steps involved, from adding the connection to getting the API string to work.
OpenAI provides some documentation on using the API
Obtain an API Key From OpenAI. Accessing the API costs money, and requires a credit card to sign up. You create an account on the OpenAI website, add a credit card and they will provide a client secret. The secret is used to authenticate your account.
Add the API as a Custom Connector in Power Apps. Once you have the API key, navigate to powerapps.com and you can add a custom Connection from the Discover > More Section of the front page.
The Next Step is Inputting the Connection String. This is where things get more complicated, and it’s best to follow the API reference mentioned above from OpenAI. You have to provide both the web address or https information for the API location, and include your client secret or token information to establish the connection.
Setting up Power Apps Buttons. The final step is to setup a button that will take the text string and submit it to OpenAI. Once the response is received it then has to be parsed and displayed.
Rather than going into a lot of detail, we point out some low code alternatives later in this article and explore some additional low code solutions that fit Power Apps use cases more than a high-code complex API connection.
OpenAI GPT Integration with Microsoft AI Builder
Its worth pointing out that Microsoft has been hard at work integrating ChatGPT into many of it’s products. AI Builder is Microsoft’s low code AI platform that makes it easy to integrate advanced AI features and Machine learning capabilities into your business apps and process automation workflows.
We highly recommend check out it’s capabilities and staying on top of the product roadmaps for both AI Builder and Power Apps. Microsoft publishes semi-annual release wave schedules that are updated frequently. One of the recent release waves noted that OpenAI GPT Services are going to be included in the AI Builder Suite of tools.
We are hoping that Microsoft will make this available in Power Apps. However, it is possible that Microsoft will prefer that Power Apps Users utilize Power Virtual Agents as a low-code chat bot platform instead of offering AI Builder or easy Azure service integration.
Power Virtual Agents are Power Platform Chatbots
Microsoft has a chatbot solution called Power Virtual Agents. It’s a low-code chatbot development platform that recently gained the ability to send messages to ChatGPT. Microsoft Power Apps does allow you to integrate a Power Virtual Agent Chatbot into a PowerApp as a low-code solution.
We recommend exploring the functionality, because the virtual agents can more easily be trained on custom data. You will also be able to track what people are asking for and tell if they are receiving quality information as a response or not.
Using Chat GPT to write Power FX Formulas
If you’re a heavy user of the Microsoft Power Platform, a common frustration is that each part of the platform utilizes a different formula language. It can be a challenge keeping track of all of the nuances. Luckily, Chat GPT is familiar with Power FX formulas, which are the “low” in low-code application development.
As an example, we asked Chat GPT to generate a PowerFX formula to filter a search box based on the selection of a dropdown menu elsewhere in the application. You could also include specific field names in your request for a formula and it will work those into the formula code.
The formulas being generated are much improved with GPT-4, OpenAI’s latest version of ChatGPT. It’s available with a ChatGPT Plus subscription. Another altenrative
Using Chat GPT for More Complex Power Apps Tasks
Curiosity and follow-up questions go a very long way when using Chat GPT. The following question and response have been truncated in the screenshot below. When asking Chat GPT how to split a Power Apps Form across multiple pages, it walks through the several steps that you would need and ultimately explains the use of a Patch Function to bring these pieces together.
Follow-up questions can be used to further explain how patch functions work and gives a decent summary of these different aspects without having to search for a related article on Google or Bing.
Using Chat GPT for Quick Power Automate Flows
Power Apps is a highly customizable platform but has limitations. A common workaround for the built-in app limitations is to link buttons within the app you’re developing to Microsoft Power Automate Flows.
While it can take some time to custom develop a Power Automate Flow, Microsoft has been busy integrating the technology behind Chat GPT into many of its products. One of thew new AI powered features is Power Automate Describe it to Design it. Microsoft built a Flow generator and it has been a very helpful time saver.
It works by taking plain text descriptions of a process and generates Power Automate Flows for you. In testing, we found that it works best with simple automations and has trouble when using third party connectors like trying to connect to the Adobe PDF connector.
Using Power Apps Generate Ideas Feature
The AI Powered Generate Ideas feature was announced at Microsoft Build in 2021 and highlights the future of Chat GPT type technology that Microsoft is integrating into their software solutions. We anticipate that these features will improve dramatically over time. The Power Apps Ideas Panel will write formula code and suggest potential filters or other items that you may want to add into your application.
Power Apps Can Convert Drawings Into Apps
Another exciting feature that utilizes AI within Power Apps is the ability to convert an image into a low code application. It’s an exciting feature that allows you to take a screenshot or draw a web form and allow AI to transform it into a low-code application.
Microsoft has offered express forms for a while, where you can also upload designs directly from Figma and convert them into an application.
How to use Chat GPT to Generate Sample Data Sets
Because we do a lot of consulting and create proof of concept applications, automations, and reports we are constantly creating example data sets. Chat GPT makes content creation much faster.
As an example, we asked Chat GPT to generate a table for the quantity and price of cars sold for each month of 2023. The table below can either be copied and pasted into Excel, added to a SharePoint List, or entered directly into a Power Apps Table.
There are limitations on the amount of data that Chat GPT will generate for you. When prompting the software to generate a large set of data it would not complete the request and would often stall out part of the way through. If you need lots of made-up data we recommend solutions such as Mockaroo – Random Data Generator and API Mocking Tool | JSON / CSV / SQL / Excel or one of the many other free tools available. Chat GPT is nice because we typically already have it open and don’t need large amounts of data for proof-of-concept work.
Using OpenAI Dall-E3 for Power Apps Icon Generation
Microsoft already does a great job of providing people with the tools needed to create beautiful low code applications, but we wanted to explore the OpenAI platform further.
In addition to Chat GPT, Open AI publishes several other AI generation tools. One of them is designed for generating pictures. It’s incredibly interesting for create realistic images that can be used in place of traditional stock images, but we found that it can also be used for generating icon packs for a custom Power Apps look.
The technology currently generates .png files instead of vector graphics which limits its usefulness at the moment, but its likely that the technology will improve quickly as more use cases are highlighted.
OpenAI Whisper Speech to Text for Power Apps
Looking beyond Chat GPT and Dall-E, the third major algorithm that OpenAI has been working on is called Whisper. OpenAI Whisper is a speech to text algorithm that matches and sometimes exceeds the accuracy of human level understanding of speech. We highly recommend checking out their website and listening to the examples that are pre-recorded to see what it can do. Being able to efficiently understand thick accents is especially surprising.
Alternatives to Power Apps for ChatGPT
For as much as Microsoft has been working to quickly push out AI powered features, it’s hard not to be disappointed with the progress of Power Apps. As of writing, there is no direct integration method from Power Apps, and there is no connector published by Microsoft for Power Automate.
This may be a play to push people towards using Power Virtual Agents, or they just haven’t had time to create these solutions.
We recommend looking at some different low-code platforms that are more difficult to use and may require some more programming which could be generated by Chat GPT or similar solutions.
For example, web forms can be quickly and easily created using Zapier Forms and there is a very easy to use ChatGPT connector that they publish.
Another option is FlutterFlow.io that provides a robust backend, and native integration with ChatGPT. FlutterFlow is an exciting PowerApps alternative because it allows you to not only generate reactive applications, meaning that one application scales for both desktop and mobile users, but the licensing is not per user per month.
Both Zapier and Flutter offer more modern interfaces than PowerApps, are more flexible, less expensive, and easier to use than Power Apps.
Pop! Automation Can Help Deploy Chat Bots and Low Code Applications
Contact us today if you need help building out low-code applications with platforms such as Power Apps or one of the many great alternatives available today that offer a wide range of advanced features and can have more favorable pricing structures for your business.
Pop! Automation also builds custom chat bots using Power Virtual Agents and integrates services across the Azure and Power Platforms.