ChatGPT – Personal Assistant with Power Apps

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.

API Reference – OpenAI API

API Reference – OpenAI API

To create a API Keys, go to your OpenAI account and Create a new secret key

OpenAI – API Keys

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

API Reference – OpenAI API

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!

The Role of a CISO in Building a Modern Cybersecurity Culture

Mr Josef Flügel from Germany – CISO (Chief Information Security Officer) at Lenze Group, who visited Pune in the month of January shared his knowledge and experience with us on developing and implementing an organization’s information security program.

He explained that the role of a Chief Information Security Officer (CISO) is to oversee the organization’s information security program and ensure the confidentiality, integrity, and availability of its information assets. The CISO is responsible for identifying, assessing, and managing information security risks, developing and implementing security policies and procedures, and ensuring compliance with relevant laws and regulations.

Specifically, some of the key responsibilities of a CISO may include:

  1. Developing and implementing an information security strategy and roadmap
  2. Establishing and maintaining an information security governance framework
  3. Conducting risk assessments and developing risk mitigation plans
  4. Developing and implementing security policies, standards, procedures, and guidelines
  5. Conducting security awareness training and education programs for employees
  6. Overseeing the implementation of security controls and technologies
  7. Establishing incident response plans and procedures
  8. Conducting regular security assessments and audits
  9. Maintaining relationships with internal stakeholders and external partners to promote security awareness and best practices
  10. Reporting on the organization’s security posture to executive leadership and the board of directors.

In summary, the CISO plays a critical role in protecting an organization’s information assets and maintaining the confidentiality, integrity, and availability of sensitive data.

Power Apps – Express Design (Build an app in seconds) – Figma to app

figma to app

In continuation with our first series – Power Apps – Express Design (Build an app in seconds) – Image to app, let us see how Figma app works.

Figma is a vector graphics editor and prototyping tool which is primarily web-based, with additional offline features enabled by desktop applications for macOS and Windows. The Figma mobile app for Android and iOS allows viewing and interacting with Figma prototypes on real-time mobile devices.

Figma to App bridges that gap between design and development, with Figma to App designers and developers can collaborate together to build an optimal experience for the end-users.

As a designer, you will simply create your design using Figma and then you upload that Figma file to Power Apps which will be taking care of converting your design into a working app.

Without further ado, let’s jump into the action.

Design in Figma

1. Go to the www.figma.com and create an account, then on the left navigation menu click on Community and look for a template named NETFLIX (first prototype)

NETFLIX

2. Click on Duplicate to load in the Designer tool – this is the place for all the customizations


3. Copy the URL from the URL Bar (see red circle in step 2 image).


4. Create a Figma personal access token using the following steps

  • On the Figma home page, click settings
  • Look for Personal access tokens, add a token description and create a new one
  • An important point to note is to copy the token
Figma settings
Personal access tokens

5. Go to Power Apps and create a Figma (preview) app

Figma (preview) app

And voila, once more – Power Apps has provisioned from Figma in a few minutes

Netflix by Power Apps

This is a huge productivity (design) saver that will allow businesses to roll out user-friendly, great-looking apps to their users in a short amount of time and effort.


API to app

At the time of writing this blog, the App-from-API feature is to be released in early July 2022.

Coming soon…

Power Apps – Express Design (Build an app in seconds) – Image to app

turn images and designs into apps using AI-powered express design

The need for Digitization is constantly growing and there are never enough resources (Cost-Scope-Schedule) to fulfil all the requirements, therefore Microsoft on 25th May during the recent Microsoft Build event, has introduced the “Express Design – Build an app in seconds” which is a new Power Apps features that accelerate the process for getting started by taking existing content (e.g.: a picture of your paper form, a screenshot of a design, a PPT, a PDF or a Figma design file) and converting them in working Power App with UI and data without requiring the maker to learn how to build an app.

This magic is done using Azure Cognitive Vision OCR model to recognize the text from your image as well as the Azure Computer Vision Object Detection model to recognize the controls on the image whether it’s a text input, a label or radio button, etc.

Azure Cognitive Vision OCR & Azure Computer Vision Object Detection model

After that, even though it’s optional, however, it’s recommended for you to set up the data through dataverse, so you will have your data stored in dataverse.

We have got three different options and we are going to see each one of them

  • Image to app
  • Figma to app
  • API to app

Image to app

Image to app

Let’s get started by building an Image to app

1. On Power Apps, click Create and select Image (preview)

Image (preview)

2. The Upload an image screen appears, where either you upload an image of your own or start with some sample images – in our case, let us upload the following Car Details Application Wireframe

Upload an image

Car Details Wireframe

3. After Azure identifies the component, tag and assign each component as per the requirements

Assign components

4. Next the system allows you to create a new table in Dataverse (recommended), or simply skip it for now.


5. In this step, map the column as per the required data type, review then create.

Columns mapping

And voila, in a few minutes – Power Apps has provisioned the app as per the given input!!!

Car details application

This is a whole new world of possibilities for the citizen developers, those architects or building technicians who are looking for a genuine alternative to building an app – truly it is Empowering every person and every business on the planet to achieve more.


Now, we are going to see how Figma to app works.

The road ahead

Recently I came across Bill Gates’s first book – The Road Ahead – which he published twenty-five years ago, I was interested to read about the predictions which he made in this book such as:

  • The internet transformation – travelling back in time people were still navigating with paper maps, listened to music on CDs, watched movies on VHS tapes – today the adoption of digital technology to transform services or businesses has engaged billions of people – anytime, anywhere – with smarter experiences.
  • Digital agents or Virtual assistants – Alexa, Cortana, and Siri have already given birth, however, the visionary has envisioned a more powerful technology capable of learning human requirements and preferences in much the way that a human assistant does – grab this opportunity, it’s the equivalent of the goose that lays the golden egg.

It is great to see how technology is helping us in unprecedented progress on COVID-19 – for instance of the innovation on rapid tests, a British company LumiraDx has created a device that’s roughly the size of a thick cell phone, with a card reader at one end. A health care worker takes a sample from a patient, inserts it into the machine, and gets results within 15 minutes.

According to Schumpeter, the process of technological change in a free market consists of three parts: invention (conceiving a new idea or process), innovation (arranging the economic requirements for implementing an invention), and diffusion (whereby people observing the new discovery adopt or imitate it) – in layman’s terms, this means Schumpeter argued that anyone seeking profits must innovate.

Knowledge must be used because it multiplies by spending!