Reader small image

You're reading from  Microsoft 365 and SharePoint Online Cookbook - Second Edition

Product typeBook
Published inFeb 2024
PublisherPackt
ISBN-139781803243177
Edition2nd Edition
Right arrow
Authors (4):
Gaurav Mahajan
Gaurav Mahajan
author image
Gaurav Mahajan

Gaurav Mahajan is a Microsoft Technology Solutions Professional who specializes in Microsoft 365, SharePoint, and AI, with over 19 years of technical consulting experience. Gaurav has a bachelor's in engineering, is Stanford certified in machine learning, and holds a PG Diploma in management from the Indian Institute of Management. He speaks at and organizes technical events, code camps, and conferences. He is a co-chair of the M365 & SharePoint Saturday, Pittsburgh (US) annual conference.
Read more about Gaurav Mahajan

Sudeep Ghatak
Sudeep Ghatak
author image
Sudeep Ghatak

Sudeep Ghatak is a Microsoft MVP in Business Applications and a frequent contributor to the Power Automate Community forum. He works as a Principal Architect in Christchurch, New Zealand and loves designing solutions based on Office 365 and the Azure platform. He is a certified Solutions Developer (MCSD) and holds a postgraduate degree in instrumentation engineering. He is an active member of the Microsoft community and often seen speaking at user groups and conferences in New Zealand.
Read more about Sudeep Ghatak

Nate Chamberlain
Nate Chamberlain
author image
Nate Chamberlain

Nate Chamberlain is a technical content creator, solution architect, and trainer, recognized as a 5-year Microsoft MVP. With a background in business analysis and systems administration, Nate has authored seven books and manages his blog. He holds an array of certifications, including M365 Enterprise Administrator Expert and Microsoft Power Platform App Maker Associate, and is a frequent speaker at user groups and conferences.
Read more about Nate Chamberlain

Scott Brewster
Scott Brewster
author image
Scott Brewster

Scott Brewster is a Microsoft 365 Solutions Architect. He has supported numerous government clients focusing on SharePoint and Microsoft 365 since 2008. His focus is on security, administration, migration, governance, and training. Scott has been speaking at conferences and user groups since 2010 and runs the SharePoint User Group of DC.
Read more about Scott Brewster

View More author details
Right arrow

Power Automate (Microsoft Flow)

Power Automate (formerly Microsoft Flow) was launched as Microsoft’s lightweight workflow engine for end users, developers, and IT professionals. It lets you build personal automated workflows using a wide range of services, without having to learn any code. There are hundreds of templates available to build flows that talk to Dropbox, Twitter, Viva Engage, Facebook, Dynamics 365, and other services. This makes building flows quicker and easier.

So, what do you use the Power Automate service for?

The clue is in the name, “Power” and “Automate.” “Power” refers to the fact that it is meant to be used by Power users as part of the Power Platform, and “Automate” indicates that the service lets us program the automation of a manual business process.

In this chapter, we will learn how to use Power Automate by working through the following topics:

  • Introducing flows
  • ...

Technical requirements

Let’s briefly look at the paid plans available for Power Automate, before exploring the initial concepts of a flow and the landing page where we will create a flow. Power Automate is available with two plans (not considering RPA plans):

Power Automate per user plan

This plan lets a user with rights run an unlimited number of flows (within service limits) with the full capabilities of Power Automate, including standard and premium connectors, based on their unique needs for a monthly fixed cost for each user.

Power Automate per flow plan

This plan lets your organization implement flows for a specific team, a department, or an entire organization without having to license each user separately.

Table 8.1: Power Automate per user and per flow plans

You can...

Introducing flows

We have mentioned that flows are the automation of a manual business process. More specifically, Power Automate lets you design a workflow comprising a sequence of tasks and conditions. These tasks can be achieved using connectors.

There are over 500 connectors available at the time of writing this chapter. New connectors are listed here as they are added: https://packt.link/connectors.

To help keep track of all the connectors being used for tasks and conditions, Power Automate provides a rich user interface that allows you to build a process map. The process map is a tool that shows the inputs, actions, and outputs of a process in a graphical format, step by step:

Figure 8.1: Sequential actions in Power Automate

We can see that after the flow is triggered, it works through a series of steps that are laid out one after the other. With the process map, we can clearly see what conditions lead to what tasks, and which connectors are...

Creating a flow using a template

If you have an idea for a flow, there’s a good chance that someone already thought about it before you. So, before building a new flow from scratch, look for an existing template. This will save you a lot of time since the template will come with actions and a process flow that can then be modified or extended. It will also serve as a quick-start guide and a learning tool. Just as you can use flows created by others, you can submit your own flows to the flow store. Your flow will appear on the gallery page if it successfully goes through the approval process.

Getting ready

You can sign up for a free Power Automate account at https://flow.microsoft.com. It has a free plan as well as business plans. Power Automate comes with most Microsoft 365 licensing plans. Refer to the Microsoft Licensing guide for more details. You can download it from https://packt.link/PP-licensing-guide. The free plan is good for prototypes. You can sign up for...

Creating a template-based app

Power Apps comes with prebuilt templates that let you create functional Power Apps without having to acquire a deep knowledge of Power Apps concepts. This provides you with an opportunity to get a deeper insight into the prebuilt apps and understand the concepts of data binding, data updates, validation, and so on. This way, you could reverse engineer some of the applications that Microsoft and other vendors have developed and shared with the community. Go through the next section to learn about creating apps using a template.

Getting ready

You need Power Apps plan included in your Microsoft 365 subscription in order to build a Power App.

How to do it...

To create an app, go through the following steps:

  1. Log in to Office.com and click on All Apps.
  2. Choose Power Apps from the list of applications.
  3. You will be taken to the Power Apps landing page. Click on All templates:

    Figure 1: Power Apps Templates
  4. There are lots of templates to choose from. Select the...

Feedback

We are constantly looking at improving our content, so what could be better than listening to what you as a reader have to say? Your feedback is important to us and we will do our best to incorporate it. Could you take two mins to fill out the feedback form for this book and let us know what your thoughts are about it? Here's the link: https://forms.office.com/r/SqsgJVkbJ1.

Thank you in advance.

Power Automate (formerly Microsoft Flow) has been launched as Microsoft's lightweight workflow engine for end-users, developers, and IT professionals. It lets you build personal automated workflows using a wide range of services, without having to learn any code. There are hundreds of templates available to build flows that talk to Dropbox, Twitter, Yammer, Facebook, Dynamics, and other services. This makes building flows quicker and easier. There are over 300 services available as of today. Some are shown in the following:

Power Automate provides a rich user interface that...

Creating a flow using a template

If you have an idea in your head, someone probably must have thought about it before you. So, before building a new flow from scratch, look for an existing template. This will save you a lot of time since the template will come with actions and a process flow that can then be modified or extended. It will also serve as a quick-start guide and a learning tool. Just as you can use flows created by others, you could submit your own flows to the Flow store. Your flow will appear on the gallery page if it successfully goes through the approval process.

Getting ready

You can sign up for a free Power Automate account at https://flow.microsoft.com. It has a free plan as well as business plans. Power Automate comes with most Microsoft 365 licensing plans. Refer to Microsoft Licensing guide for more details. You can download it from https://m365book.page.link/flow-licensing.

The free plan lets you run a limited number of flows until it expires.

How to do it....

Editing a flow

You can update the flows that you have created. These flows appear under the My flows tab in the flow landing screen. Other flows that have been shared with you can be seen in the Team flows area.

Getting ready

You need to be a flow owner to edit it.

How to do it...

Log in to https://office.com using your Microsoft 365 account.

  1. Click on Flow. This takes you to the landing page.
  2. Choose the flow you want to modify or click Edit:

  3. Edit the flow by clicking on the Edit link in the top right-hand corner.
  4. Make changes to the flow and click Save.

How it works...

A newer version of the flow is created every time you make a change. Currently, there is no way of going back to an older version. If you would like to save multiple versions of the flow, then you can do so by exporting the flow before making a change and saving the package in a version control system, such as VSTS or GitHub.

See also

  • The Creating a flow using a template recipe in this chapter
  • The Testing your...

Exporting a flow

Exporting and importing a flow allows the reusability of the package and its deployment from one environment to another environment. A flow can be saved as a template, along with the dependencies used by the flow and all associated metadata, so that it can be reproduced in another Microsoft 365 tenant. This feature is useful in the absence of a version-control mechanism within a flow.

Flows can also be moved from one environment to another, using solutions, but we'll discuss solutions later in this chapter.

If you want to migrate a single flow, then the Import/Export options are useful features to employ.

Getting ready

You need to be a flow owner in order to save a flow as a template.

How to do it...

Log in to https://office.com using your Microsoft 365 account.

  1. Choose the flow you want to export.
  2. Go to Export | Package (.zip) under the More link in the top right-hand corner, as shown in the following screenshot:

  3. Give the package a name and click Export Package...

Importing a flow

A flow package contains the logic of the flow as well as information about the connectors. It can therefore be imported into a new, separate environment, preserving the flow logic; however, the connection information needs to be updated according to the environment it is imported to.

Getting ready

Everyone within an organization can import a flow and publish it.

How to do it...

To import a flow, follow the following steps:

  1. Go to the Power Automate landing page.
  2. Click on Import, specify the location of the saved template, and click Import.
  3. Specify whether you would like to update an existing flow by selecting Update or create a new flow:

  4. When the flow is imported into a new environment, the connections have to be reconfigured by clicking on the Select during import link:

  5. This brings up a panel on the right that lets you create a connection or choose an existing connection:

  6. You can save the flow after the connections have been configured.

How it works.....

Adding owners

Owners can edit and save existing flows. By default, the creator of the flow is added as an owner.

While you could build personal flows to automate some of your personal work (such as monitoring your emails or OneDrive), it is always advisable to have more than one owner if you are designing the flow to achieve a common objective or business process. A flow that has more than one owner is called a team flow.

Besides editing the flow, an owner can also do the following:

View the history of a given flow.

Edit the properties of a flow.

Modify an action or condition.

Manage owners.

Delete a flow.

Getting ready

Owners must have a Power Automate plan to create a team flow (you can look at the options at https://flow.microsoft.com/pricing/). Only an owner of the flow can add other owners.

How to do it...

  1. Go to the Power Automate landing page.
  2. Go to the Owners section on the bottom right-hand corner of the screen and click Add an owner.
  3. You should be able to add any individual...

Testing your flow

Every solution that is built needs to be validated against a set of test cases to ensure that it does what it was created to deliver. Power Automate offers a very good platform to test the flow logic. The testing process actually runs the business logic, and so you shouldn't test flows on your production (live) system. The flow user interface (as demonstrated in the How to do it...section) can be used to observe inputs and outputs, as well as investigate errors.

Presently, the feature only lets you test the last five flow runs.

Getting ready

Only the flow owner can test the flows, which means that you will need to be added as a co-owner if you want to test the flow.

How to do it...

  1. Go to the Power Automate landing page.
  2. Select the flow that you want to test and click Edit.
  3. Click on the top right-hand corner to test the flow:

  4. This will reveal a panel on the right with some options:

  5. Choose the appropriate option from the list. This list might look different...

Creating a solution

Solutions provide the Application Lifecycle Management (ALM) capability for Power Apps and Power Automate. Solutions let you bundle related flows (and apps) within a single deployable unit and migrate them from one environment to another.

An environment is a place to store, manage, and share your organization's business data, Power Apps, and flows. They also act as secure spaces to separate apps that may have different roles, security requirements, or target audiences.

The following are some scenarios where you could consider different environments:

  • Creating separate environments for test and production versions of your apps
  • Isolating the apps and flows to specific teams or departments in your company
  • Creating separate environments for different global branches of your company

Creating and managing environments for Power Platform is beyond the scope of this book. You can read more about creating environments for Power Platform at https://m365book.page.link/environments...

Creating a flow in a SharePoint library

Power Automate is integrated with SharePoint. The Power Automate option appears against every SharePoint list and library. This lets you set up SharePoint-specific triggers right from within the SharePoint list or library. You can use Power Automate to build your custom events, such as the addition of a document, metadata updates, and so on. Within SharePoint, you can run a flow with the following scopes:

  • On demand for a selected file
  • On demand for a selected list item
  • For a specific folder within a library

Getting ready

You need to have a SharePoint license to access SharePoint Online. You also require editing rights for the list to add a flow to it.

How to do it...

  1. Navigate to the SharePoint list (or library).
  2. Select Create a flow from the top menu under Power Automate:

  3. A panel will appear on the right with all the SharePoint templates:

  4. Select a template and build a flow as we described before.

How it works...

Selecting a template...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Microsoft 365 and SharePoint Online Cookbook - Second Edition
Published in: Feb 2024Publisher: PacktISBN-13: 9781803243177
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Authors (4)

author image
Gaurav Mahajan

Gaurav Mahajan is a Microsoft Technology Solutions Professional who specializes in Microsoft 365, SharePoint, and AI, with over 19 years of technical consulting experience. Gaurav has a bachelor's in engineering, is Stanford certified in machine learning, and holds a PG Diploma in management from the Indian Institute of Management. He speaks at and organizes technical events, code camps, and conferences. He is a co-chair of the M365 & SharePoint Saturday, Pittsburgh (US) annual conference.
Read more about Gaurav Mahajan

author image
Sudeep Ghatak

Sudeep Ghatak is a Microsoft MVP in Business Applications and a frequent contributor to the Power Automate Community forum. He works as a Principal Architect in Christchurch, New Zealand and loves designing solutions based on Office 365 and the Azure platform. He is a certified Solutions Developer (MCSD) and holds a postgraduate degree in instrumentation engineering. He is an active member of the Microsoft community and often seen speaking at user groups and conferences in New Zealand.
Read more about Sudeep Ghatak

author image
Nate Chamberlain

Nate Chamberlain is a technical content creator, solution architect, and trainer, recognized as a 5-year Microsoft MVP. With a background in business analysis and systems administration, Nate has authored seven books and manages his blog. He holds an array of certifications, including M365 Enterprise Administrator Expert and Microsoft Power Platform App Maker Associate, and is a frequent speaker at user groups and conferences.
Read more about Nate Chamberlain

author image
Scott Brewster

Scott Brewster is a Microsoft 365 Solutions Architect. He has supported numerous government clients focusing on SharePoint and Microsoft 365 since 2008. His focus is on security, administration, migration, governance, and training. Scott has been speaking at conferences and user groups since 2010 and runs the SharePoint User Group of DC.
Read more about Scott Brewster