ChatGPT can be used in a variety of ways, including Natural language processing, this means that it can be used to understand and generate human-like responses to text-based queries, allowing for more natural and efficient communication between humans and computers.
This gives an idea of what approach we could take to solve the problem of having a personal asistant!
A personal assistant is a professional who provides administrative and personal support to an individual or a group of individuals. They typically manage tasks such as scheduling appointments, arranging travel, managing emails, conducting research, making phone calls, and handling other administrative tasks that the individual or group they work for may need assistance with.
In recent years, advances in technology have led to the development of virtual personal assistants, which are digital assistants that can perform similar tasks as human personal assistants, but without the need for a physical presence. These virtual assistants are typically powered by artificial intelligence (AI), to be precise – in this era – ChatGPT-4.
OpenAI API
OpenAI allows us to interact with the API through HTTP requests from any language and uses API keys for authentication.
To create a API Keys, go to your OpenAI account and Create a new secret key

Power Platform – Custom Connector
In Power Platform, a custom connector is a tool that allows you to create a connection between your app and an external service or system. With a custom connector, you can extend the functionality of Power Apps by integrating with APIs and services that are not natively supported.
By following these steps, create a connector that is tailored to our specific needs and requirements:
Navigate to the Power Apps portal and select “Custom connectors” from the left-hand menu, then Click on the “New custom connector” button to create a new connector.
1. Under General tab: Fill in the basic information about your connector, such as the name, description, and logo – in the Host textbox, enter: api.openai.com

2. Under Security tab: fill as follows

3. Under Definition tab:
3.1 Click on New action – Define the actions and triggers that your connector will support. An action is an operation that your connector can perform, such as creating a new record or updating an existing one. A trigger is an event that your connector can respond to, such as when a new record is created or updated.

3.2 Click on Request and fill as follows (as per the OpenAI Documentation), then click Import
Verb: POST
URL: https://api.openai.com/v1/completions
Headers: Content-Type: application/json
Body: { “model”: “gpt-3.5-turbo”, “messages”: [{“role”: “”, “content”: “”}]}

3.3 Request > edit the Content-type property > provide a default value and make it required and internal (see capture)


3.4 Request > edit the Body property > make it required and important (see capture)
repeat the same for Body payload property (see in green) – content, role, model – edit each of them and make it required and important.


4. Skip the Code (Preview) tab.
5. Under Test tab:
5.1 Click New connection, add your API Key which you created (see above) in the following format: Bearer sk… then click Create
Then fill as follows and click on Test operation

5.2 Copy the Response Body and set it as a Default Response in the Definition (see next step)

5.3 Under Definition tab, click Add default Response and paste the Body Response then click Import, then Update the custom connector.

Integrate the connector with Power Apps
1. In Power Apps, create a Blank Canvas App, insert a Text Input and a Send Icon as follows

2. Under Data, add the ChatGPT Connector

3. On the Send icon, OnSelect property – set the following code to call the the ChatGPT API via the custom connector
Set(varChatGPTAPIResponse, ChatGPTConnector.ChatGPTApi(“gpt-3.5-turbo”, Collect(collectionChatMessages, {role:”user”, content:TextInput1.Text})));
the variable varChatGPTAPIResponse contains the role and content properties which you can easily manipulate as per your convenience (Gallery, Datatable, etc).


Voila! this is how our personal assistant looks!