Jared Matfess's Blog

Having fun with SharePoint, Office 365, and Microsoft Azure

Pro Tip for Getting Started with Flow’s Get Items & Get Records Actions — August 4, 2018

Pro Tip for Getting Started with Flow’s Get Items & Get Records Actions

I have been having a bit more fun recently with using Microsoft Flow to help automate more of the manual (aka boring) tasks that I have to do in a given week. I thought I would share a quick “Pro Tip” for those who are just getting into building workflows. The Get Records, Get Items, etc. actions are incredibly powerful and often times what you will want to use to start iterating over your content.

My Pro Tip for when you’re first starting to build out your workflow is to set the Top Count parameter to 1 and then run the flow so you can see what data will come back from the action. T

TopCount1

Running a quick test of your Flow you can examine the Body of the request and get to understand the different values for your data. Should you also want to take advantage of a Filter Query, it’s important to use the correct internal name for the field and this is a quick & easy way to figure that out. By limiting yourself to just 1 record, you can easily scan the data without the clutter of multiple records being returned.

BodyforJSON.jpg

Nothing fancy, just a quick Pro Tip for speeding up your Microsoft Flow development!

Automating the sending of presentation slides using Microsoft Forms & Microsoft Flow — July 30, 2018

Automating the sending of presentation slides using Microsoft Forms & Microsoft Flow

This past weekend I had the distinct pleasure of being able to co-present with one of my Slalom colleagues on “Leveraging Office 365 Services to Drive Office 365 Adoption”at SharePoint Saturday NYC. This was a new talk for me and I was very excited to try it out at one of my favorite events.

One of the questions I always receive during my sessions is how can the attendees get a copy of my slides after the presentation. There’s always the awkward dance of me as a speaker not exactly knowing where we are posting and then trying to remember that I need to upload them somewhere so that folks can grab them. I decided to head this off by leveraging Microsoft Forms & Flow during our presentation to help facilitate that.

During the event I asked folks to fill out a very brief Microsoft Form which asked them if they’ve rolled out O365 yet, if so which services, and then their e-mail address.

SPS-Questions

Then I built a very quick Flow that triggers when someone submits that particular form. And then the next action (since I’m always tweaking my slides) is to go out to my OneDrive and convert that instance of my presentation to PDF since I’m not supposed to send out Slalom themed decks in PPTX format.

Flow-FirstSteps

Next I’ll get the actual response details from the form submission using the “Get Response Details” action. Flow will automatically throw this into an Apply to each loop however you’ll just set the Form Id to the Microsoft Form you are using, and then the Response Id which is the individual submission from the user. The loop will only run once.

Get-Response-Info-Submitted-Form.jpg

Finally the longest step is to have it send the e-mail:
Microsoft-Flow-Send-Email-Attachment

I kept it pretty simple with populating the To field from my 3rd question on the Form. The subject was hardcoded but I could always extend that in the future to pick the event name from a SharePoint list or something else but I went with the easy route on this one. In the body I provided links to Amy and my LinkedIn pages in case attendees wanted to connect in the future.

Under the advanced options I included the Attachments Name & Content from the output of the Convert to PDF step above, I also made sure to set the Importance to High and that Is HTML to Yes so that I could enable formatting as depicted in the Body section of the e-mail.

So that was it – a pretty simple Flow which has a pretty high impact, especially during a live presentation, so that the people will walk out with the slides and not have to worry about tracking me down later!

Hope you enjoyed this quick blog post!

Using Microsoft Flow Get Items Action and Filter by E-mail address of a Person Field — July 14, 2018

Using Microsoft Flow Get Items Action and Filter by E-mail address of a Person Field

This blog post is going to win an award for best title ever. ūüôā

A colleague and I were working on a problem where we wanted to aggregate all the list items that were assigned to a particular person, and then send them an aggregated e-mail in a simple HTML table. Sounds easy enough right?

To get started – let’s create a simple list with Title, Owner (Person), and DueDate (Date/Time) columns like below:

List1-Items-Users-DueDate.jpg

Next, we’re going to create our Flow from a Blank Template and have the Trigger be Flow Button for mobile – essentially manual for testing purposes. Next, add the “Get items” action and enter your site address & list name:”

InitialFlow

Before we add the filter to Get items, I recommend you save and test the flow so that you can see what gets returned from SharePoint before you apply your filter.

What gets returned is in the Body section of the Get items outputs:

FlowOutputsBody

Looking at what’s returned you’ll see that the Owner column has properties such as Claims, DisplayName, and Email.

Now, let’s go ahead and add the filter so that we’ll return List items that have tim@matfess.onmicrosoft.com as the Owner.

Show advanced options to show the Filter Query input

FlowAdvanced

Now let’s add the filter and notice the case sensitivity. You’ll want to reference the e-mail attribute as ColumnName/EMail¬†so for my example it’s Owner/EMail

FlowFilter.jpg

Now try running your Flow and you should see success!

Status200Flow.jpg

The output of the Get Items is now a collection of all the Items returned based on your filter. Now you can loop through the results and take the appropriate action based on your use case.

Happy Flowing!

 

Is Microsoft Flow the replacement for SharePoint Workflows? — February 12, 2017

Is Microsoft Flow the replacement for SharePoint Workflows?

I recently had the privilege to co-present a session on Microsoft Flow & PowerApps at the Microsoft Beyond US Roadshow in Hartford. I am a huge fan of Microsoft Flow and have done several sessions on showing how you can orchestrate data across Dropbox, OneDrive, SharePoint & Salesforce with clicks & not code. One of the attendees in my session asked a very common question that I thought would make a good short blog post: “Is Flow the replacement for SharePoint Workflows?”.

Over the past few years I have built dozens of business applications leveraging the SharePoint platform to route requests through approval processes, provided metrics for turnaround time on requests, and automated non-value added steps. These solutions undoubtedly would leverage the SharePoint workflow engine for sending e-mails, assigning tasks, etc. Since Microsoft introduced the Workflow Manager in SharePoint 2013, there has not been any additional enhancements to their workflow engine. Compounded with the fact that SharePoint 2016 did not include an updated version of SharePoint 2016 it would make sense to assume that Flow is the replacement for SharePoint Workflows.

However, I would argue that Microsoft Flow is really positioned as the next generation of business process management applications vs an outright replacement to SharePoint Workflows.¬†From a feature parity perspective not all of the SharePoint Workflow¬†actions are available in Flow (yet they seem to be added all the time). At the time of this blog there aren’t the basic string manipulation actions, or copy items (also not available in 2013 but are in 2010), content approval/publishing, check-in/check-out, and wait for field changes in list items. There is also the caveat that in order to access on-premises data that you would need to setup a Gateway in order to make it accessible to Microsoft’s cloud.

Microsoft Flow provides much more capability than SharePoint does which might initially frighten some Enterprise customers. While there is a lot of value in being able to orchestrate data across both line of business & public clouds there definitely needs to be some up front planning to ensure that you do not jeopardize the integrity of your company’s data. For example it is absolutely possible to develop a Flow to copy files from your OneDrive for Business to your personal DropBox.

Finally, from a licensing perspective Microsoft Flow is a pay by the drink kind of service (technically pay by the Flow run). There’s a bit of ¬†math but essentially you are allocated an allotment of Flow runs per user in your Office 365 tenant based on your plan. Be sure to check out Microsoft’s Flow Pricing¬†page for up to the minute guidance. Whereas with SharePoint Workflows it’s essentially as many workflow runs as what your infrastructure can support.

So getting back to the original question – is Microsoft Flow the direct replacement for SharePoint Workflows? In my opinion – No. Microsoft Flow is the evolution of business process management allowing you to build elegant solutions which have the ability to orchestrate data across various line of business applications leveraging “clicks” and not code. Combined with PowerApps as your mobile/responsive front-end the barrier to creating enterprise applications has absolutely been lowered to where you no longer need a team of developers to create basic applications.

Hope this helps & happy Flow-ing.

 

 

Leveraging Microsoft Flow to Capture #YammerWins for Knowledge Management — August 18, 2016

Leveraging Microsoft Flow to Capture #YammerWins for Knowledge Management

First off – I want to give credit to Naomi Moneypenny for the idea of tagging threads in Yammer with #YammerWin. (Or at least I believe it was her) I think that’s a brilliant idea and helps to demonstrate that you would use a product like Yammer for more than just water cooler gossip. When I started to think about the job though of trolling Yammer for #YammerWins it occurred to me that it’s kind of a copy & paste intensive process. There’s also no quick way of getting a count of how many #YammerWins you have, etc. Sure you can click the #YammerWin hashtag in your group and then see all the different threads which certainly works but it’s not super organized.

I’m a consultant and development is what we tend to do – but to be honest, I don’t have the warm & fuzzies about doing custom development on top of Yammer. T

So then Microsoft Flow came along and I got a really cool idea. What if I could build a Flow that would do the data collection for me and then store it in a SharePoint list? Once it’s in a list I can do anything from kicking off workflows, to building mini-reports for management, etc. Talk about a #MicrosoftFlowWin

So I did & here’s what my Flow looks like:

YammerWin

  1. The trigger is when a new item is created in a Group (point at a Yammer Group)
  2. I include a condition, if the Message Text contains #yammerwin
  3. If yes, it creates an item in a SharePoint list

My SharePoint list has a few extra columns (MessageText, URL, and CreatedAt) and I map the following attributes from the Yammer post so that I can see the message text, when it was created, and the URL to the actual object.

YammerWin2

Once that’s all set I let the flow fire and when someone in the group sends a message which includes #YammerWin, the Flow picks it up and creates an item in SharePont:

YammerWinSharePoint

As many of you know – once the item is in SharePont, you can do anything! You can build custom reports to show management, have a workflow that assigns this to one of your Knowledge Management librarians for curation, etc. The URL also allows your librarian to go ahead and view the thread for context should the message text not contain all the information that they would need to help build the knowledge management record.

For those building Knowledge Management Portals in SharePoint – this is a really great way to start to capture your #YammerWins in a structured fashion.

Cheers to Naomi for the idea, and to the Microsoft Flow team for building the technology!

Well done! #MicrosoftFlowWin!