cancel
Showing results for 
Search instead for 
Did you mean: 

How to never lose your car again in under 10 minutes using Microsoft Flow

 Have you ever wanted to drop a digital breadcrumb on a location for later access? I first thought of this for snow shoeing, where trails can be established using layers of 'pins' dropped by users, so fellow snow shoe'ers can find new or already established trails, or blaze new ones.

Recently, I was inspired to develop a mobile app for capturing homeless stats during the annual state count/sweep as a demonstration using PowerApps, Flow, SharePoint and potentially some PowerBI. By using a mobile app to capture homeless interview information, we can give back hundreds of volunteer hours, provide better data by reducing the number of times the information is captured, in hopes of better serving this demographic. Using Microsoft's Modern Application Platform, a lesson in humility, and a hackathon opportunity, I still came up short on functionality until just recently, which inspired THIS blog.
More on the homeless app in a future blog!

 

Don't loose your car, ever again Dude!The Dude Flow buttonThe Dude Flow button

 

With the click of a 'Dude' Flow button, you will save your location information from your mobile device, to a SharePoint Online list. Lastly, you'll see a link in the mobile notification that launches your mobile app with step by step directions on getting you back to your car.

SharePoint, Flow and the Dude Flow buttonSharePoint, Flow and the Dude Flow button

NOTE: This has only tested on iOS at this time. Please let me know your experiences so I can keep this post up to date.

 

Requirements

Short of a developer or community Office 365 account you will need:

  1. You will need an active Office 365 subscription to create a new Flow.
    Office 365 Subscription requiredOffice 365 Subscription required
  2. You will need to install Microsoft Flow on your mobile device if you haven't already.
  3. While you aren't required to store the location information in SharePoint to obtain the end result, which is directions back to your car, it is required to be able to show the location maps using this awesome PowerBI visual. 

PowerBI ESRI Mapped LocationPowerBI ESRI Mapped Location

I should note that you could have stored the location information generated when pressing the Dude Flow button, into an Excel file stored on your OneDrive for Business as an alternative location than using a SharePoint list. There are a few things you would need to do with the Excel file to work. Check out any of the Flow Tweet blogs or how to videos on the additional table formatting you need to do first if you want to go down this path.

 

To complete all the steps in this article,  an Office 365 E1 license, student or Small Business license should suffice. You will also need PowerBI if you want to view the locations or perform other BI wizardry on. 

 

Create a new SharePoint list 

  1. Create a new SharePoint (custom) List with the name CarLocation
  2. Add columns as illustrated below for Longitude, Latitude and TimeStamp:

CarLocation SPCustomListCarLocation SPCustomList

Create a new Microsoft Flow 

  1. Log into flow.microsoft.com using your Organizational O365 account
  2. Create a new (blank) Flow
  3. Select Flow button for mobile
  4. Rename the new flow Dude

Add the Dude Flow ButtonAdd the Dude Flow Button

Connect to your SharePoint list

  1. Click New Step
  2. Click Add an action
  3. Type or select SharePoint (SERVICES)

Flow Add SharePoint ActionFlow Add SharePoint Action

Map location to SharePoint list columns

  1. Click to select SharePoint Create Item
  2. Select or type Site address and List Name 
  3. Drag to add Longitude, Latitude and TimeStamp columns as illustrated:

Flow SharePoint Service Create ItemFlow SharePoint Service Create Item

Create mobile notification after SharePoint list updated

  1. Below the Update SharePoint Flow step, click Add an action
  2. Click to select Notifications (SERVICES)
  3. Select Notifications - Send me a mobile notification

Flow Send Mobile Notification serviceFlow Send Mobile Notification service

Add link to notification to show map location

  1.  Add the notification text you would like to see appear on your mobile device when the button is clicked. I used Dude, I know where your car is! 
  2. In the Link field, add the following:
    https://www.google.com/maps/place/
  3. With NO SPACES, drag Longitude, followed by a comma, and then drag Latitude (as illustrated) into the Link field. 
  4. Provide some text which you will click to launch maps on your mobile device into the Link label field.

Flow mobile location linkFlow mobile location link

Save the Flow 

  1. Rename Flow: Dude
  2. Click the check mark to finish
  3. To exit the Flow editor page, click the Done arrow

 

Flow Rename Dude and SaveFlow Rename Dude and Save

Test the Flow 

  1. Launch Flow on your mobile device
    NOTE: You may need to log in using your Organizational account if it's your first time using.
  2. Click Buttons
    NOTE: You may be prompted to access your devices location information, accept and continue. 
  3. Click the Dude button
    Flow Test Mobile Dude buttonFlow Test Mobile Dude button
    Spoiler
    Dude Flow button in action
    REF: https://www.youtube.com/watch?v=qWtebXifEdE

You can stop here and happily never loose your car again, otherwise, continue to add in the PowerBI map visuals...

 

Add PowerBI to map visual data 

  1. Create new Power BI (desktop)
  2. Click the Get Data button, and select from SharePoint site from the list
  3. Enter your site address, select carlocation list, and click Load


PowerBI Connect to SharePointPowerBI Connect to SharePoint

Add map visualizations in PowerBI

  1. Click and drag to add ArcGIS Visualization
  2. Drag Latitude, Longitude and Timestamp from carlocation fields to Visualizations fields as illustrated:

PowerBI map SharePoint columns to Map VisualPowerBI map SharePoint columns to Map Visual

Limit location results to show only the last location stored

  1. Click the Edit Query button
  2. Filter the TimeStamp column by IsLatest
  3. Click the Close and Apply button
  4. Review results

PowerBI limit location to IsLatestPowerBI limit location to IsLatest

 

To summarize

We used a simple list in SharePoint to store our location information. We created a Flow button that we access on our mobile device to capture our location information. When the Dude Flow button is pressed, your location data was stored in SharePoint Online, then a notification message appeared on your mobile device indicating success, with a link to the map location which you clicked to launch Google maps, to route you back to your car. We also pulled the location data into Power BI, then showed that location information in a visual map. 

Give it a try on your own

It will be fun, I promise and I'll bet that you'll be dropping Dudes' all over town to see your map light up. You may even be thinking about that snow shoe app now... right? I'm looking forward to hearing if and how this article inspired you to come up with an idea based on these features.

Stay tuned as I continue to work out the homeless app. I'll be presenting these demos at upcoming SharePoint user group and SPSaturday events.

Please let me know what you'd like to see demonstrated or if you have any questions about these steps. 

 

Mahalo!

 

Author: Jennifer Pearcey

@pcmom03 

 

Got Questions?

 

linkedin: www.linkedin.com/in/jennifer-pearcey-09603617

Meet Our Blog Authors
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • MCT | SharePoint, Microsoft 365 and Power Platform Consultant | Contributor on SharePoint StackExchange, TechCommunity
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 12 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #Office365 #MSFlow | C-sharpCorner MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – https://kamdaryash.wordpress.com Youtube channel - https://www.youtube.com/channel/UCM149rFkLNgerSvgDVeYTZQ/