When Microsoft released Flow, the geek in me saw a great opportunity to use it to add a level of complexity into my life that was totally unnecessary. Using Microsoft Flow combined with Azure Powershell Runbooks, I was able to successfully tackle a personal problem I have with keeping track of recurring bills, by having them automatically get added to my calendar.
What's even cooler, is that I was able to take that information and create visualizations for data analysis using PowerBI.
And the best part? All this is instantly updated with new data as soon as a new email hits my inbox. Pretty neat!
The full process looks something like this:
- Filter through my email looking for a bill.
- Save the attachment to Azure Blob Storage.
- Start an Azure Runbook that reads the attachment from Azure Blob Storage and uses a custom library that parses the PDF bill to plain text.
- Use RegEx matching to extract the amount due, the billing period and the due date.
- Save the extracted data to an Excel workbook on OneDrive.
- Return the information to Microsoft Flow, which creates a calendar entry on the date the bill is due and with the amount needing to be paid.
- Send a push notification to my phone to inform me I have a new bill scheduled for payment.
- Create a report for analysis using PowerBI pointing to the spreadsheet as the data source.
But .. why?
Why would I want to do something so complicated for something of such little value? Simple. To learn.
With the nature of my work as a Solutions Architect, i'm often tasked with finding solutions to complicated business problems. In my experience, designing a new network infrastructure to help bring a client into the digital world is easy; spin up a couple VMs on your public cloud of choice, throw in Active Directory, maybe a VPN or two and the job is done. The real challenge is found when you need to find a way to make the same digital transformation on people and process. I knew that becoming skillful in techniques to overcome these obstacles would be of great value to me as an architect, and also to my clients; especially if I could do so using services that they already own; in this case, Office 365 and Azure.
This whole bill processing thing may seem a little arbitrary, but When it comes to learning something new, I find that it is best to get my hands dirty with the product. I think that it also helps to have a real world application for something I want to learn. It assists me in giving my learning objectives some context, and keeps my motivation high by knowing i'll have something that I will use at the end of it all.
Now, before adieu is in any way furthered, here's how I was able to Go with the Flow.
- Going with the Flow: Part 1 - Introduction
- Going with the Flow: Part 2 - Creating the Flow
- Going with the Flow: Part 3 - Saving attachments to Azure Blob Storage
- Going with the Flow: Part 4 - Parsing attachments with Powershell
- Going with the Flow: Part 5 - Working with Azure Runbooks
- Going with the Flow: Part 6 - Completing the Flow
- Going with the Flow: Part 7 - Visualizing data in PowerBI