Low and no-code development is an important part of the modern IT landscape, providing users with a way to fill the app gap by building the tools they need using workflow automation and simple UI tooling. You don’t need to learn complex programming languages, just add rules to connections between applications, data, and users.
TO SEE: Feature Comparison: Time Tracking Software and Systems (Tech Republic Premium)
By treating applications as a set of customizable building blocks, you use a simple solution to solve a complex problem. But what if it were even simpler – if all we had to do was say what we wanted an application to do and it would build itself? Instead of building our software based on available components, we could simply tell our development tools, “Take the latest sales numbers and compare them to the current sales pipeline to show me which prospects to focus on.” It’s a grand vision, and one that’s surprisingly close.
Add AI to Microsoft’s Power Platform
Microsoft has begun to bring some of these ideas into its Power Platform, using a mix of its own technology and OpenAI’s Codex machine learning. It’s been using Codex in Power Apps for a while and is now bringing it to Power Automate to provide AI assistance in designing flows.
Codex is an interesting tool, a version of OpenAI’s large language models trained on code rather than prose. One version, using a model built from GitHub’s public repositories, powers the Copilot service. The result is a powerful way to help you build both code and tests, and use it as a way to give you smart tips for using common libraries and design patterns. That approach should work well in the Power Platform, where the underlying problem space is more tightly constrained than Copilot’s more open programming model.
The intent of Codex in Power Automate is to use natural language as the basis for application development. Instead of directly building a Power Automate flow from scratch, you can write a brief description of what you want it to do. Codex then generates a series of possible flows that can be tested before editing or going straight into production.
Using Codex in Microsoft’s Power Automate
Using the tooling is easy enough. If you’re signed up for the preview, click Create in the Power Automate sidebar, then choose the You describe it, AI builds it option. You will see a text box where you can write a description of a flow. For example, the suggestion – “When I receive a new email from my supervisor, message me in Teams” – will generate a number of possible flows that can then be modified if necessary.
As Microsoft points out, the tool currently works best with Microsoft 365 apps and services; yet I could use it with common Power Automate connectors like Twitter or other social media. The Codex instance has been trained using public templates and flows, so expect it to work better with more common connectors. Microsoft has said it will add wider range support as the preview expands and moves towards general availability.
Once you have a potential flow, click Next at the bottom of the screen. This next step asks you to verify that the connectors your flow will use are connected to your accounts. If they are not connected or if you want to use a different account, click “…” to add a new connection. The next step is to add settings for the connectors, triggers, and actions the flow will use. These are all brought into one screen, so you don’t have to adjust them individually.
The result is a development workflow unlike any other. It’s much more like working in an Office application than an encryption tool, even in a low-code environment like Power Automate. If it wasn’t delivered as a set of web pages in the Power Platform portal, you’d expect it to be an old-school wizard, clearly hiding new technology.
The nice thing about working with Power Automate is that it extends the concept of fusion teams that Microsoft pioneered with its interdisciplinary approach to low-code development. If you can say what you want in a sentence, chances are the service will at least create a skeleton of the app you want. You can then hand it over to more experienced developers to fine-tune the flow and maybe use the new AI-powered sketch-based UI designer to add a Power Apps front end.
Programming by example
While building an application with a few words of English is a convenient way to jump-start an application, there is another problem that automation helps solve. Building the expressions needed to convert data from one format to another can be complex, often requiring multiple functions and an understanding of the syntax required at both ends of the transformation.
Power Automate now provides a way to easily show what the output should look like, automatically building the necessary expression. All you need to do is edit the action you want to use the converted data for, choose the target text field and select Format data with examples. You’ll be presented with a list of data in your flow – just choose the one you want to use, preview the data from the source, and then preview the desired output format.
The service provides an expression that you can test with different inputs. If the results don’t add up, just add more examples of inputs and outputs. There’s no need to get into the weeds of editing the first expression the service generates when you just need more examples.
The underlying technology here is a technology developed by Microsoft Research called PROSE, program synthesis by examples. It is an important tool that allows you to experiment in your own applications using a non-commercial .NET SDK or using the excel implementation. PROSE is ideal for low-code environments such as Power Automate because it is designed to work with domain-specific languages. In Power Automate, it is used to support a specific subset of the environment: the tools it uses to format output. This allows it to operate in a properly constrained environment where both input and output are closely controlled.
This is a very different approach from that used by the more general OpenAI Codex model used to create a flow. That’s actually a good thing, because we’re not trying to build workflows; instead, we’re doing much like Excel here, using PROSE to take, say, a set of machine-readable content and convert it into something suitable for humans. We can start with a date in ISO format and convert it to a long date or take an address and convert the US state to the standard USPS abbreviation so that the output is consistent and usable.
Microsoft’s work with AI in Power Platform, GitHub, and Microsoft 365 shows that it doesn’t have to be a tool to replace humans. Instead, it delivers a range of features that can help us be more productive, acting as an assistant that works alongside us. The result is one that can accelerate application development, filling the gap between the code we need and the code we have much faster.
To learn more about low-code development and automation, download these TechRepublic Premium resources: IT Leaders’ Guide to Low-Code Development and software automation policies. Get 30% off an annual subscription to TechRepublic Premium by using code bf22-30. This great deal ends December 7, 2022, so act now!