Reader small image

You're reading from  Workflow Automation with Microsoft Power Automate - Second Edition

Product typeBook
Published inAug 2022
PublisherPackt
ISBN-139781803237671
Edition2nd Edition
Right arrow
Author (1)
Aaron Guilmette
Aaron Guilmette
author image
Aaron Guilmette

Aaron Guilmette is a Senior Program Manager with the Microsoft 365 Customer Experience, helping customers adopt and deploy the Microsoft 365 platform. He primarily focuses on collaborative technologies, including Microsoft Teams, Exchange Online, and Azure Active Directory.
Read more about Aaron Guilmette

Right arrow

Accepting User Input

Many types of business processing require some sort of user input. Input can come in the form of data typed in by a user, a choice prompt where the user selects “Yes” or “No,” or even uploading a file. Power Automate provides an interface for users to supply information as part of the flow. Connected applications, such as Power Apps, can also be used to supply information to a flow.

In this chapter, we’re going to revisit the concept of instant cloud flows from Chapter 5, Creating Button Flows. You’ll be introduced to gathering different types of user input that can be used later in a flow. Specifically, this chapter will cover the following topics:

  • Understanding the user input options
  • Creating a flow that uses all input types

By completing the example exercise at the end of this chapter, you’ll become familiar with the different types of user input options and how they can be used...

Understanding the user input options

User input can take many forms. When creating a manually triggered flow (also known as a button or instant flow), Power Automate allows flow designers to accept six types of user input. To add input capability to a manually triggered flow, click the title bar labeled Manually trigger a flow.

When the trigger object expands, click Add an input to be presented with the input options shown in Figure 14.1:

Figure 14.1: Input data types

The types of input are as follows:

  • Text: The Text input option supports several configurations, including a free-form text field, a single drop-down selectable list, and a multi-select list.
  • Yes/No: The Yes/No input option can be used to allow users to utilize a Yes/No toggle switch.
  • File: The File input option provides the ability for the user to upload a file from their device. If the user is accessing the flow from a mobile device, they can also access the camera to capture...

Creating a flow that uses all input types

In this example, we’re going to configure a simple flow that uses all six input types and use that data to populate a SharePoint list. You could also try this example to save content to a database.

Before you begin configuring the flow, you’ll need to configure some basic prerequisites, such as a SharePoint list that contains the columns to store the various data values. Once the prerequisites have been completed, you’ll be able to move on to creating and testing the flow.

Configuring the prerequisites

Since the data for this flow will be stored in a SharePoint list, you’ll need to configure a SharePoint list if you don’t already have one that you can use. In this example, we’ll create a new list in an existing site and then add one column to store each of our values.

To create the list, follow these steps:

  1. Navigate to a SharePoint site, click Site contents, and then click...

Expanding further

You may have noticed that the image shows up as an attachment inside the list item instead of in the picture column. At this time, the SharePoint Create item or Update item actions do not support manipulating an image column by default. With some creativity, however, you can craft a SharePoint HTTP request to upload the data directly.

Let’s see how!

  1. From My flows, select the Favorite Things flow for editing.
  2. Insert a new step between the Add attachment and Send an email steps.
  3. From the Choose an operation dialog, select Compose:

Figure 14.21: Adding a Compose action

  1. In the Inputs area of the Compose action, enter the following data:
    {
      "type": "thumbnail",
      "fileName": "FavoriteThing.jpg",
      "fieldName": "Picture",
      "serverUrl": "https://learningpowerautomate.sharepoint.com/sites/FavoriteThings",
      "serverRelativeUrl...

Summary

In this chapter, you learned about the six different kinds of user input that Power Automate can accept, including text, numbers, yes/no choice boxes, dates, and binary data. You also configured a flow that utilizes each of these methods and saved the content to a SharePoint list.

Requesting user input is a very useful feature of Power Automate, enabling a number of self-service and data gathering operations for your organization. With these types of input capabilities, you can enable workflow scenarios that rely on unique data provided at runtime, such as photos of objects or other types of content that can’t be obtained without user interaction.

In the next chapter, we’ll begin looking at advanced operational scenarios for Power Automate, such as interacting with Azure Active Directory.

Learn more on Discord

To join the Discord community for this book – where you can share feedback, ask questions to the author, and learn about new releases...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Workflow Automation with Microsoft Power Automate - Second Edition
Published in: Aug 2022Publisher: PacktISBN-13: 9781803237671
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 $15.99/month. Cancel anytime

Author (1)

author image
Aaron Guilmette

Aaron Guilmette is a Senior Program Manager with the Microsoft 365 Customer Experience, helping customers adopt and deploy the Microsoft 365 platform. He primarily focuses on collaborative technologies, including Microsoft Teams, Exchange Online, and Azure Active Directory.
Read more about Aaron Guilmette