With the evolution of the cloud and the total revamp of the Dynamics platform, we now have what’s called the Power Platform. This is a combination of the following solutions:
Power BI
Power Apps
Power Automate
Power Virtual Agents
When it comes to Power BI, this is a topic better handled on its own, and there are many books out there covering this topic in detail. Suffice to say, it is a powerful Business Intelligence (BI) tool that allows you to create data-driven visualizations for better analysis and decision making.
This article is extracted from our book Fundamentals of CRM with Dynamics 365 and Power Platform.
In this article, we’ll focus primarily on Power Apps and how to leverage Microsoft Flow (currently known as Power Automate) for task automation. Through the separation of Common Data Service (CDS), we now can build custom applications leveraging the same backend but build our own custom apps.
We will be covering the following topics:
What is in Power Apps?
Common roles and scenarios for Power Apps
Tying it all together with Microsoft Flow
By the end of the article, you should be able to quickly build applications with no/low code. As you will see in the examples provided, low code refers to the ability to create Excel-like formulas and no actual custom code.
Understanding the Power Apps way
Power Apps is a collection of applications, services, connectors, and backend data platforms that allows makers or creators to develop applications at a rapid pace, with no or minimal code. It provides a set of tools allowing the creation of custom business applications. The idea is to put the power in the hands of the business users and provide them with the ability to create the necessary tools to be leveraged by the business.
The underlying data platform, called CDS, allows storing business data in a structured manner but is not the only backend available. Power Apps can leverage structured data stores, either through CDS or other structured databases supported by a large number of available connectors or through loosely structured data stores such as SharePoint. We can leverage either online or on-premises data sources. The most common ones include, but are not limited to, the following:
Office 365
Excel
Dynamics 365
SharePoint
SQL Server
A Power Apps application, depending on how it’s built, can leverage the business logic and workflow capabilities we’ve become familiar with Dynamics over the years. This provides extensive capabilities to automate former manual processes, and digitally transform your business from the ground up.
In addition, and by design, Power Apps apps are built respecting all responsive design restrictions, allowing these apps to run on any device. We can have the same app displaying one way on a smaller phone screen while leveraging the additional screen real estate on a larger tablet or on the desktop.
This is a true build once, use anywhere transformation.
In addition, possibly the most powerful feature is the ability to build a new app with no code. The low-code/no-code approach is gaining ever more popularity, and Microsoft is yet again at the forefront of the pack, being recognized by Gartner as a leader in the no- code/low-code application development world.
The platform is not limited only to makers and creators though. It has all the necessary plumbing in place to allow developers to programmatically interact with the platform components. They have the ability to build custom extensions, interact with data, create new business logic and custom connectors, as well as tap into external data sources.
With such great features, it is not hard to see why this platform is so powerful, and it’s getting more and more traction every day. The fact that Microsoft is recognized as a leader for the effort in this space stands only to validate the fact that this is a step in the right direction. Putting the power in the hands of all users, whether developers or business users, opens the potential for new, creative ways to build fabulous functionality — the likes of which we haven’t seen so far.
Users/personas leveraging Power Apps
As we’ve just seen, Power Apps apps can be created by business users, with a no-code/low- code approach, or by hardcore developers. This speaks to the platform’s ability to grow and change in order to create new and revolutionary solutions.
We often encounter the following categories of users interacting with this platform:
Makers/creators
Standard users
Administrators
Developers
Let’s take each separately and see how they leverage Power Apps.
Power Apps for makers/creators
With Power Apps, you can create the following types of applications:
Canvas apps
Model-driven apps
Portal apps
Typically, an app maker will start from http://web.powerapps.com.
This is the starting page, allowing you direct access to the various components of the platform:
The Home page presents the user with navigation on the left side of the screen, allowing you easy access to Apps, Data, Flows, and Solutions.
On the main screen, you are presented with a list of options to start creating your new app. You can either choose one of the three app types or select to start from an existing template. Selecting the All Templates link presents you with a listing of predefined sample applications. Some of them, while primarily created as a demo of what can be done, can be used as is. Solutions such as To Do List, Book A Room, or Asset Checkout are simple examples to start from. Open some of these and observe how they are built. This will help you understand the capabilities and options to expand in detail.
Looking at an app card, you will observe the app type in the bottom corner of the card, as in the following screenshot:
Switching the filter from All to Office presents a listing of templates related to Office 365 functionality. These are apps leveraging the Office 365 services either through integration or by using the Office 365 backend. The next screenshot shows the filter with the Office apps selected:
Typically, you would use the following tools, depending on the app type you are creating:
Power Apps Studio is the designer used for creating canvas apps. We will see what those are later in this chapter in the Comparing canvas versus model-driven apps section. Simply put, at this time, the designer allows the creation of apps in a manner very similar to creating a PowerPoint slide.
The app designer is used for building model-driven apps. These are apps built based on a pre-existing data model. The designer allows the creation of the components based on existing data structures, and wraps them all in a site map, thereby creating an application with custom navigation.
Power Apps for application users
Another category of personas is the application users. These are the application consumers. They can leverage the pre-built apps either through a computer, tablet, or mobile device.
These users will have access to corporate applications based on permissions and the applications shared with them. They are not the ones creating apps.
Typically, on a mobile device, opening the Power Apps application presents you with a listing of various corporate apps you have access to, as in the following screenshot:
Selecting one of the apps launches the application and puts the user directly into the application interface. The following screenshot shows the main screen for TimeSubmissionApp:
Let’s move on to the next category of users of Power Apps.
Power Apps for administrators
Administrators are typically people that manage applications and access. They do not always create new applications for the enterprise but are involved in proper application management, including access security and various policies.
Administrators have access to two distinct administration centers. They are as follows:
The Power Apps admin center is available at https://admin.powerapps.com. The Power Platform admin center available at https://admin.powerplatform. microsoft.com.
The subsequent sections will explain these data centers in detail.
The Power Apps admin center
The Power Apps admin center has a layout somewhat similar to the App Maker interface. We find on the left side the navigation options, including the management of various environments and data policies, the definitions of the various integrations configured, and the general tenant details.
The main page shows the details of each navigation option selected. The following screenshot shows the Power Apps admin center with the Data policies navigation selected:
Selecting the New policy option at the top right of the screen allows an admin to create a new policy.
The Power Platform admin center
The Power Platform admin center, on the other hand, while presenting a similar interface with navigation to the left and content on the main page, includes several other options. Besides environment management, which is common across both admin centers, as well as data integration and data policies, we have some additional options. Here, we have access to create and review various support cases opened with Microsoft, as well as to the option to configure data gateways. Data gateways are used to configure connections from the app to an on-premises data source.
The following screenshot shows the Power Platform admin center screen with the Help + support navigation option selected:
As you can see, in addition to the standard options, we can see analytics on the various components of the Power Platform service, including details on the following:
Capacity
CDS
Microsoft Flow
Power Apps
We also have access here to other admin centers within the same tenant. These include the standard Power BI, Power Apps, and Microsoft Flow, as well as Dynamics 365 if it’s part of the same tenant.
Power Apps for developers
Finally, developers are application creators that can do a little bit more than app makers. They typically get involved in app creation when custom code is used to extend the available functionality. They can create Azure functions, plugins, and custom workflow extensions, as well as customize client-side functionality leveraging JavaScript. Typically, when using a model-driven app, a Dynamics 365 developer’s skillset applies.
The Microsoft docs provide extensive developer documentation and code samples, including extending canvas and model-driven apps, working with CDS, creating custom business logic, creating integrations and packaging, and distributing these applications. This is a really good source of information and it should be bookmarked so that it is one click away.
Let’s look next at the process to create Power Apps.
Creating Power Apps
Power Apps provides more than just the capability to create no-/low-code apps. The entire suite of business apps is comprised of four main components.
CDS is the data platform. It serves as the backend data store for multiple applications, including Dynamics 365. It includes several predefined entities representing tables in the database. As time progresses, more and more applications start to leverage the same common data store, resulting in fewer synchronizations between applications, less integration work, and no need to define a specific source of truth.
Portals is the newest feature added, where we now can create public websites, with support for various authentication mechanisms, as well as present CDS data. We will be looking at Portals in detail in a later part of this chapter.
Canvas apps are custom applications created based on a specific user experience. They are typically very visual, with excellent support for various mobile platforms. These applications are typically responsive and can scale on various screen sizes and resolutions, making them a great choice for simple business process execution apps. In addition, the platform supports a large number of connectors to other applications and platforms. This makes a canvas application ideal for when you want to use a backend other than CDS.
Model-driven apps are applications built based on an existing data model. These are based on a schema defined in CDS. Model-driven apps generate a user interface along the lines of the core functional modules in Dynamics 365, which should be familiar to all CRM users.
Let’s look at these application types in the next section.
Comparing canvas versus model-driven apps
As mentioned, from a user experience perspective, the two main categories of apps that can be created by leveraging Power Apps are canvas apps and model-driven apps.
Fundamentally, these application models are quite different from each other, and they apply to different scenarios. It is also possible to mix canvas and model-driven apps and incorporate a canvas app into a model-driven app, for example.
While a model-driven app is focused primarily on the data, while keeping a somewhat standard visualization, a canvas app allows creativity to take over to create visually appealing user experiences.
In the subsequent section, we will see how to create canvas apps and model-driven apps.
Creating a canvas app
Canvas apps are applications built in a very visual manner, like designing a PowerPoint presentation deck. Each app page is a slide in your deck, and you can skip between various pages based on links or rules on each page or controls.
Canvas apps are created through a simplistic drag-and-drop interface, by positioning predefined controls on a canvas, then defining properties and actions for each of these controls.
Connectors for various data sources are at the core of this app type functionality. Microsoft has built many connectors already, and that number is increasing with every new release. Developers have also the ability to extend and create new connectors.
We can create a simple canvas app by navigating to the maker environment, available at https://make.powerapps.com.
Make sure you select the correct environment where you want your application created from the top-right side of the screen. You can see the PACKT Course (packtcourse) environment selected in the following screenshot:
If you choose to start a new application from scratch, you can select, from the Make your own app area, the section for Canvas app from blank, as you can see in the preceding screenshot.
This launches a wizard where you get to define the app properties and target. The following screenshot shows the first step in the wizard to create a new app called PACKT Canvas App.
We’ll target the mobile format:
Selecting Create opens the Power Apps Studio application in a new browser tab, where we can start composing our new app. Observe that, from the start, the format is configured for mobile:
Opening Microsoft Store and looking for Power Apps Studio will take you to the app installation page:
In Power Apps Studio, expanding the hamburger icon on the left side opens the slider containing the selection between a tree view of application elements or data sources. The following screenshot shows the expanded menu:
We want to use an Excel file stored on our personal OneDrive as a data source for this application. For this reason, we first need to do a little legwork to set everything up. Navigate to your OneDrive, create a folder called PowerApps, and create a new Excel file. We’ll call this file Customers.xlsx.
Open the Excel file, and on the only sheet, create the following headers:
FirstName
LastName
PhoneNo
EmailAddress
Select the four columns, and from the ribbon, select Format as Table. You need to have a formatted table in Excel in order to use the data in Power Apps.
Select a layout and your screen should look as in the following screenshot:
Select OK and your table will now be formatted. Give this table the name of the customer. For this example, I’m also adding a new tab with another table.
Make sure you have saved your file, and let’s go back to building our canvas app.
Start on the Data sources tab to create a new connection to our Excel file. Remember that this file is stored on our personal OneDrive.
Expand Connectors in the left navigation, as in the following screenshot:
If OneDrive does not show in the quick connectors list, select Show all connectors and find the personal OneDrive option. Select OneDrive and select the option to add a new connection.
The Connect to data wizard starts and allows you to set up a connection to your OneDrive, as presented here:
Log in when prompted. You are next prompted to browse and select the Excel target file. Remember we called it Customers.xlsx.
The next step is to select the table we want to use as the data source. The following screenshot shows the selection with the table named Customers as an option. Therefore, it’s important to give the correct name to the tables in Excel. Here, we see the wizard selection screen:
Select the table and then choose Connect. Now, your newly created connection will appear in Data sources under the In your app expanded section, as in the following screenshot:
In order to display the contents of our Excel table, let’s add a form to the screen design:
1. Select Insert from the menu.
2. Find the Forms option.
3. Select Edit to insert an editable form. Your design should look as in the following screenshot:
From the Properties blade on the right side of the screen, for Data source, select the Customers connection we created earlier. In Fields, select Edit fields to define which fields we want to have displayed on this form.
Your selection should look as shown here:
You can choose to select some or all the available fields. If you only select the first and last name, along with the email address, your form will look as in the following screenshot:
Make sure also to set Default mode to New. This will open the form by default with a blank form, allowing the user to add a new record.
From the Insert menu at the top, select to also add a button to the form. We’ll call this button Submit.
Now comes the fun part. Let’s wire this all together. With the Submit button selected, find the function definition and type in the following statement:
SubmitForm(Form1)
The following screenshot shows the entire configuration:
You can now run the application by finding the play button at the top-right side of the editor. The application will present the following screen to a user:
Enter some values in the form and click on Submit. Once done, check the Excel file to confirm the data you entered is added. My file looks like so:
This was a very simple example. With a large number of connectors and the functionality available to add various controls and create formula-like actions, you have the ability to create new canvas apps as complex or as simple as you need.
Don’t forget to save your application by going to File | Save as and giving the app a name. Select Save when done:
Microsoft provides extensive documentation on creating, maintaining, and extending canvas apps. I would recommend starting from the Power Apps maker documentation, available at https://docs.microsoft.com/en-us/powerapps/#pivot=homepanel=maker.
Creating a model-driven app
As opposed to canvas apps, where the app maker has complete control over the application layout, in model-driven apps, the focus is on leveraging predefined components to create a Line Of Business (LOB) application. Some of the benefits of this application type include the following:
Leverage a component-focused application design, with a responsive layout that remains consistent across multiple devices.
The design of the apps is similar to creating a configuration in Dynamics 365. Applications can be packaged and distributed as solutions.
There are three major steps in creating a model-driven application. They are as follows:
Business data modeling Business process definition Application composition
A model-driven application will leverage CDS. You can leverage the default entities available with CDS, as well as add your own custom entities. Once you have the data model complete, you can move on to defining the specific business processes. You do this through business process flows and business logic. Finally, when you have these pieces in place, you can define the user interface using the app designer.
Let’s build a simple application and see how these pieces fall together to form a model- driven application:
- In the maker portal, available at https://make.powerapps.com, select the Create option from the left-side navigation. From the options presented, select Model- driven app from blank, as shown in the following screenshot:
2.This starts the wizard, allowing you to commence working on your application. Select Create on the pop-up window:
The wizard continues with the definition of the app name and properties. The following screenshot shows the app definition screen of the model-driven application:
3. When you have completed all the fields, select Create to generate the new application.
From this point on, you should be familiar with the interface, as this is the exact same interface as the one we use to configure apps in Dynamics 365. You are presented with the app designer, which allows you to configure the site map, which is the application navigation, the various dashboards, and business process flows, as well as adding the various entities to be used in the application. The following screenshot shows the app designer on a newly created blank model-driven app:
The main components of the designer include the top menu bars, with options to save, validate, and publish, along with the application menu with options to add, edit, and remove items from the application. The main designer window includes the standard view of all components making up the application.
Finally, on the right side, we find the options to add various components to the application, as well as edit and modify component properties.
Let’s start by first adding the Contact entity to our application. Select the Entities option from the ARTIFACTS listing. This presents you with a listing of available entities from CDS, as seen here:
Here, you can select an entity by browsing to it from the available entities listing, or by searching for a particular entity.
Searching for and selecting the Contact entity adds it to the application, as reflected on the main application screen. The following screenshot shows this action:
You can use this approach to add multiple entities at the same time. Observe, though, that, along with each entity, we are bringing in all the entity definition elements. Here, we make a very important decision. Do we need to carry in our application all these elements? We can go and edit, for example, the list of views. Selecting Views on the designer window shows, on the right-side blade, the Contact views available. You can leave the All checkbox selected to add all the elements or choose them one by one. It is recommended to only keep in the application the elements that are strictly needed.
The next screenshot shows this selection choice:
Looking at the site map, we can observe a warning presented by the app designer, along with the Configuration Missing message. This is because a certain level of validation takes place as you design your application. The screenshot here shows this message:
You will see this message on a newly created app since we have not defined the site map properties yet. Select the pen icon to the right of the site map. This presents you with a site map designer screen, as seen here:
Here, you can start defining the application navigation. Observe the similarities with the configuration for Dynamics 365. You define the three major elements:
Area: The main navigational category; a container for the other elements. Group: One or more groups can be defined per area, allowing you to categorize subareas.
Subarea: The individual entity links.
You can drag any of these elements to the navigation or edit the existing elements. Selecting the new area’s top elements allows us to edit its properties, as in the following screenshot. We have edited the title to show Customers:
When defining the subarea, which points to an actual entity in CDS, we have a slightly more complex list of properties. We need to select the type, including options for Entities, Dashboards, Web Resources, or URLs. Selecting an entity allows selecting the data store entity to be linked to, as in the following screenshot:
When satisfied with the configuration of your new site map, select the option to save. Note that once you are ready to present the new navigation, you must select Publish from the top navigation to move the site map from draft mode to published. The following screenshot shows the final published site map:
Once you return to your app designer, you should save and validate the app. If any other validation errors are encountered, select and resolve each one before publishing the app.
When done designing the app, publish it to make it available to the organization. You do that from the same top-right menu, as shown here:
Finally, test your application by selecting the play option on the far right of this menu. Your newly created application will open in a new browser window and will present you with the familiar Dynamics 365 user interface:
Congratulations! Now you have created a Power Apps model-driven app, albeit a very simplistic one.
For additional details and to learn more about creating model-driven apps, check the Microsoft documentation, available at https://docs.microsoft.com/en-us/powerapps/ #pivot=homepanel=maker.
Understanding CDS
CDS is a relatively new paradigm created by Microsoft. It describes a storage mechanism for data in the cloud. This data is to be used and shared across multiple business applications.
CDS is currently at the core of Dynamics 365. The entire former CRM stack, now comprising of separate applications for Sales, Customer Service, Marketing, Field Service, and PSA, share the same CDS.
Within CDS, data is stored in a set of entities. From a programming perspective, you can think of comparing it to classes. Each entity represents an object type. Some common entities are Account, Contact, Lead, and so on.
You can think of entities as tables in a database or sheets in an Excel spreadsheet. The entity defines the model, the columns of the table. The individual records make up the data stored in these entities.
While CDS includes some standard entities that are typically used and shared across multiple applications, you can always create your new custom entities.
The licensing model covers in different ways the use of custom versus standard entities.
Power Apps application makers can create new applications leveraging the data model in CDS. There are two distinct licenses available for Power Apps. Plan 1 is geared primarily toward user creating canvas apps, while plan 2 is geared toward more complex needs, including model-driven apps with custom code and workflows.
For those learning to use Power Apps, there is also a Community plan, which is free. The licensing guide, refreshed with every biannual release, provides all the licensing details you need. At the time of writing, the most current licensing guide is the one released in August 2019 and is available for download at https://go.microsoft.com/fwlink/p/?LinkId= 866544.
Where CDS differs from a normal database is in its ability to model a business definition for your organization in a much easier way. This model is easy to manage, through a visual interface and no code. Security is also applied by default, and you must manage permissions to allow users access to your data.
CDS is based on a rich set of metadata. This allows the creation of entity relationships and defining specific data types.
Most importantly, CDS powers a rich set of applications. From the custom application, you can create either a canvas app or model-driven apps; to Dynamics 365 solutions, CDS is at the core. You get to choose how complex your apps are, and if you need to create apps through the provided visual tools or you want to develop custom code applications, CDS can span across all these models and allows great flexibility.
Along with the data model, you can leverage a large set of connectors. These connectors allow integration with other LOB applications. There are hundreds of these connectors available, and you can extend and build your own connectors for specialized applications. Some of the most common available connectors include connectors to all the Microsoft applications, along with connectors to some of the most popular third-party applications. For example, if you want to integrate with tools such as Twitter, Slack, Wunderlist, Google Drive, or other storage platforms, as well as various blogging platforms and others, chances are there’s already a connector built.
The power of this platform comes from its ability to connect with a large number of already-existing applications, as well as the ability to customize connectors for new ones. There are over 200 connectors available, and that number is growing rapidly.
The following screenshot shows only a few of the available connections supported by the existing connectors:
Further to the existing connectors Microsoft is also offering a set of application templates based on the various existing connectors. When you select to create a new application, you can choose to use CDS at the core, but also leverage other connectors. You can select from various application templates, as shown in the following screenshot:
Along with Power Apps creation, if you choose to leverage Flow, it also takes the advantage of the existing connectors and possibly CDS. When creating flows, you can choose to tap into these services supported by the connectors. The following screenshot shows a list of the most popular services available:
Flow actually takes this approach even further, by providing templates for connectivity. The next screenshot shows some of the connectivity templates available:
As mentioned, CDS is all about structuring data based on entities. Navigate to the maker interface, available at https://make.powerapps.com.
Once you log in, you can find the listing of available entities by going into Data | Entities. The following screenshot shows you the navigation elements:
Selecting the Entities option presents you with a listing of all the entities, as in the following screenshot:
Clicking on any of the available entities allows you to see the definition, with the available fields and data types, as well as other metadata. The following screenshot shows the Account entity fields and properties:
From the top ribbon, selecting the option to add a field allows you to extend the entity definition through a simple user interface, and with no complex SQL statements or other code. The following screenshot shows the Add field side blade properties:
To make things even easier, on the top ribbon, you also get an option to edit data in Excel. The ribbon is shown here:
The ability to directly interact with the data, using the same user interface, makes it so much easier to manage your current applications. Once you have your data in Excel, you can make easy modifications, do bulk edits, and then use the Get data option to bring those updates into your CDS.
One big advantage of working in CDS, and this is something that former CRM customizers are already familiar with, is the ability to work with solutions. You can manage solutions by navigating from the left-side navigation to Solutions. Here, you will find all your existing solutions already deployed in the environment, as well as the ability to create new solutions, import solutions, publish customizations, as well as get the solution checked, which does an analysis of the solutions selected and provides recommendations on things to review and improve in your existing customizations. The following screenshot shows the Solutions area, along with some of the standard solutions installed in this environment, and the ribbon options for managing solutions:
This is also the new interface used by the Dynamics 365 solution manager, in case you switched from the classical interface to the modern one.
Extending the ellipsis on a solution provides you with additional solution management options, as shown in the following screenshot:
These should also be familiar options for solution management that you have seen while customizing any former CRM system.
Now that we have seen how to create both canvas and model-driven apps, let’s look next at how we can present the data to external users through the use of Portals.
Leveraging Power Apps Portals
Power Apps Portals, or Portals for short, is a relatively new feature added in 2019. At the time of writing, this feature is still in preview, but for those that have used the CRM Portal features, it should look familiar.
Basically, we now have the same portal functionality that has been available in Dynamics 365 brought over to the masses in Power Apps. This opens a new world of possibilities, by allowing us to create applications leveraging CDS and exposed to the public through a simple-to-implement portal.
This tool is also targeted at makers — non-developers. Applications with an external-facing website can be exposed to non-organization users, leveraging various identity mechanisms or anonymously. The Content Management System (CMS) features of the portal, along with the ability to leverage the other Power Apps tools, now allows the easy creation of various low- to medium-complexity apps with no developer experience needed. A very powerful feature indeed.
Navigating in the Power Apps maker interface to Create, you will find the option to create a portal application from blank, as in the following screenshot:
Selecting the Portal from blank (preview) option triggers the portal creation wizard, as shown:
Select a unique name that gets validated and follow the wizard steps to complete the setup. Once you click on Create, the portal provisioning process starts, and you are notified of the status, as shown:
You can check the status of the provisioning process by navigating to Apps. Here, you will find the portal grayed out while it’s provisioning, as in the following screenshot:
This process will take a couple of minutes, so grab a coffee while you wait.
When done, you are able to navigate to the portal solution by selecting it from the Apps screen, or expanding the ellipsis and selecting Browse.
You are taken to a new portal branded with the default template, as in the following screenshot:
From this point on, you can start customizing and extending the portal. I recommend you see the documentation on portal customization available at docs.microsoft.com.
Let’s have a look next at some automation options available through the creation of flows in Power Automate.
Leveraging Microsoft Power Automate flows
Have you ever used IFTTT on your mobile device? If so, then Flow will look familiar, but a lot more useful. Microsoft Power Automate flows allow you to create automation rules and integrate various applications and services. Flows can be triggered automatically or manually and execute within your application or across multiple applications. The most basic example is an approval process, where you need email notifications, user actions, and the ability to store the result set.
As I mentioned before in this chapter, while discussing CDS, Flow is the glue that ties together various aspects of an application.
Within the maker experience in Power Apps, you can navigate from the left navigation to Flows, as in the following screenshot:
Here, you are presented with a listing of exiting flows that you or your team has already created and shared, or the ability to create a new flow.
Selecting New from the top ribbon presents the following options, as in the following screenshot:
If you select the Create from template option, and then choose See more templates, you are presented with a listing of available quick templates that you can leverage to quickly create a flow. Some of them leverage Microsoft products, while others span across other applications, such as various social networks or third-party tools. The following screenshot shows but a small example of the templates available:
Choosing to build a flow from blank allows you to select the specific properties through a wizard interface. The first selection is the ability to choose a trigger for your flow. This is typically an action in an application or a request to an endpoint that is exposed. The following screenshot shows this selection wizard step:
Depending on the selection, your first step is populated in the user interface. You will need to select the specifics of the trigger. For example, if I define my trigger to be the creation of an account record in CDS, my trigger will look as in the following screenshot:
Click on +New Step to define the following actions. Let’s say we want to wait for 5 minutes before executing the next action. We can search for the Delay action and define in this step the delay properties, as shown:
Let’s add a new step afterward. We want to send an email with some of the account information. Select +New Step again. Select from the options or search for Mail. Find the Send an email notification option and select it.
Here, we need to populate the specifics. You can leverage the Dynamic content option to read information from the account that was just created. We want to send the email to the primary email address on the account. Your selection looks as in the following screenshot:
Same with the subject — we want to add some text and the newly created account number. In the body, leveraging the same approach, we can provide some of the information we collected for validation. Your complete email form could look something as in the following screenshot:
Once you are satisfied with your newly created flow, make sure to save it. At a high level, the flow we just created looks as in the following screenshot:
Select the Flow Checker option at the top right to validate that the steps created are logically correct. Your output should show no errors, and hopefully no warnings either.
The following screenshot shows the output for the flow we just created:
Finally, with the flow created, it’s time to test it. Select the Test option from the top-right ribbon. Since this is the first run, you can only choose to perform the trigger manually. Select Save & Test:
Now, to trigger the test, add an account record to your CDS. You will see the status of your flow in the running state until complete, as in the following screenshot:
Finally, when the run completes, you will find the status updated. If all is good, your status should show Succeeded, as in the following Run history window:
Check also for an email notification with the details provided. It should look as in the following screenshot:
Now we have a fully functional flow that notifies the new account owner when a record was added to CDS. It’s all done through configuration alone, without a single line of code. This means that any user with permissions can do this.
Now that we have come to the end of this topic, let’s summarize what we have learned.
Summary
Throughout this article, we learned how to create a small, targeted application with great flexibility and speed. We learned that the no-code/low-code approach really pays off and has an important role in any business.
We looked at the various personas involved with the process of creating and using Power Apps, the process to create Power Apps, the types of available Power Apps, including canvas and model-driven apps, the role CDS plays in the bigger scheme of things, the ability to create public web-based solutions leveraging portals, and finally, how to tie it all together by leveraging Flow. (currently known as Power Automate)