Updates to Flow Studio App in 2023 October

There’s been a series of updates to Flow Studio App on our development build, as I’m preparing to push this next stable build to production, I thought I’d take this time to list down lots of changes we’ve done in this latest series of updates.

Production 1.1.51

Dev 1.1.58

Oh what happened to the red colour!

  • Switching UI Control Set towards Fluent 2

    We are in the middle of switching the overall look and feel and UX experience from default Telerik component style to the new Telerik + Fluent style, which would be more inline with the experience in Power Platform and also M365.

  • Switching primary colour from red to a “whale” colour

    First is switching away from the red colour - so we can actually use red to indicate serious issues happening elsewhere on the screen that demands your attention, like that "Flow Suspension” notice on the top-right.

  • On Flows, Flow (Admin) and Flows (solution) screens, we added pagination controls, this greatly helps rendering the grid when you have hundreds of flows.
    Don’t worry, search and sort is applied prior to paging, so it won’t leave you with having to browse through several pages before finding your item.

  • The grid menu dropdown filter had an bug fix that allows us to select the fields more accurately. Previosuly, the menu often lose focus and we aren’t able to easily select a field to filter.

  • Flow Diagram had several fixes

  • Approvals tab had more fixes.

  • Settings tab is brought back - we will be making lots more user-configurable settings very soon.

  • We tidied up the overall page styling and reduce wasted padding around the grid and window (but do give us feedback if we mess something up on your device)

The next lot of updates will begin to drop on dev branch really soon.

Updating Flow Studio's Flow Diagram feature

A customer reached out regarding Flow Diagram in Flow Studio - there was a bug preventing it from being generated. This was probably an issue that had been going on for some time - Flow Diagram was a feature last updated since June 2020. I’m very grateful when customers reach out with an email to ask me to look into something - thank you for bringing this to my attention.

In this case, we had a simple syntax bug, and then an evening of playing with Flow definitions and Mermaid JS graph syntax to give it some overdue love.

In Flow Studio’s drawing, we draw a subgraph whenever we see a scoped action: Scope, If, While, For Each loops. But in Mermaid the arrows must be linked to a node. So Flow Studio draws an imaginary “/End Scope” action, for lines to connect to at the bottom of the graph.

Previous versions don’t attach the line from the end of a scope correctly to the parent, leaving the crazy picture we see on the left.

After this update, we now get the cleaned logical version on the right.

When following “Non Succeeded” run-after path in a flow definition, we now draw a dotted arrow instead of the traditional solid line.
You can try our latest test build on https://dev.flowstudio.app/

Flow Diagrams are designed mainly for makers to document their flows with a diagram. Both Mermaid JS markdown is available, as well as generated image.

Let me know if you have any feedback.

Power Automate API changes - v2 Admin scope now needs user_impersonation

This blog post is about two major updates to Flow Studio App and Flow Studio for Enterprise.

MSAL v2 Update

First one, we finally updated Flow Studio to MSAL v2 there’s a few reasons for this, but primarily, this is because we want to support modern browsers that are now by default disabling 3rd party cookies, which prevented previous authentication via hidden iframe method in earlier versions of MSAL and ADALjs.

Incidentally, this also means Flow Studio App now works on iPad and Safari. And should work better for many customers within enterprise that has 3rd party cookie disabled.

MSAL also supports multiple accounts so that’s an interesting scenario in the future to support multi-user or multi-tenancy? We’ll see.


Power Automate Admin API Scope

Secondly, we have a note on Power Automate API changes and how it affects us.

Power Automate /scopes/admin/v2/ supports fetching up to 250 flows per request prior to paging, by comparison, v1 only supports 50 flows. This means reading flows as admin is once again much quicker.


But we’ve also noticed that admin flow requests now need an additional user_impersonation scope.

Access Microsoft Flow as signed in user” (nice name!)




When customers login to Flow Studio App v1.1.45 or later, you will be asked to re-consent due to this additional scope.


field notes using Power Automate with Power BI

I have been working at a client learning, testing and building Power BI reports, datasets, dataflows, datamart and dashboards for the last 8 months. With a fairly healthy dose of Power Automate thrown in. I wanted to take a short breather and write down some of the learnings so far. I also would really like to hear your feedback regarding what your Power BI best practices are.

I will be presenting my experiences and examples in the Australian Digital Workplace Conference next week in Melbourne. I hope I’ll be seeing you there.

The system components

  • Call the API of a custom business application to retrieve project & product data, the system uses a NoSQL database, so we are pulling out pages of JSON via Power Automate.

  • At the moment, we store these JSON files into a document library in SharePoint.

  • Use Power BI dataflow to process and merge these JSON data into a staging table.

  • Use Power BI dataflow to transform data from the staging dataflow to actually do work.

  • Reports use the staging dataflow, and reference it if additional local transformations are needed.

  • Fancy visuals with Deneb and HTML content visuals.

Calling APIs - we are using HTTP request and calculating nonce and api-key within Power Automate - this wasn’t something Power BI can call directly without some middleware. In particular, we are interested in a subset of projects from our dataset - so every evening, Power Automate calls Power BI Dataset Query, fetch a list of project codes and make API calls. It also checks if there’s been a change from the version stored in SharePoint and skips writing if the JSON has not been modified. (Unfortunately, we don’t have a last modified metadata from source).

We put JSON data into a SharePoint library and store them by months - this is because the business has a monthly reporting cycle, and we wanted data captured against last month vs this month. An alternative would be to use Azure Blob Storage for this staging area, because once we reached several hundred JSON files, SharePoint often throws too-busy error to Power BI during data refresh.

On re-use, we tried a myriad of methods, and we found using two dataflows to work the best. The first dataflow provides raw json content per file from SharePoint. This dataflow is configured for incremental refresh, so if the JSON isn’t updated, this doesn’t need to refresh in the dataflow (this solves our file too busy problem). Datamart can’t easily be used within the ETL of another dataflow (it’s more suitable for direct query).

Our second dataflow is where we do the transformation of the json data navigate the JSON structure and pull out records, lists accordingly.

We try to have very light local transformation or modification within the Power BI report. Instead, as much as possible, we want to run the transform within the dataflow.

This is a high-level overview blog post and there’s quite a bit more (smaller, bite sized) notes I want to write down in time, but this will do for now, and we’ll leave the rest for a future discussion.

Other design decisions, notes and thoughts

  • What Power Automate brings to the table.

  • What Power BI Dataflows brings to the table.

  • Notes on using DAX and Power Query M

  • Using Dataverse

  • Considerations with using SharePoint or Azure Blob Storage

  • Licensing costs

“Soon” Azure Data Factory and Microsoft Fabric offerings

Using Power Automate to provide Timezone and Local Time to Power BI Dataset and Data Flow

Problem:

In Power BI data transformation, we have useful methods such as DateTime.UtsNow() and DateTime.LocalNow() they work great when running from a desktop. But when running as a dataset or dataflow within the Power BI service, these fall apart because The Power BI service does not have the concept of a local timezone. Everything is UTC. The 'regional locale settings' is only useful in controlling the formatting of dates and currency, but not in setting timezone.

Some ideas on how to fix this:

  • There are useful methods such as: DateTimeZone.RemoveZone DateTimeZone.ZoneHours but again they don't work within the Power BI service.

  • Manually add a time duration offset everywhere - but you can't handle day light savings

  • Call an external website Display Last Refreshed Date in Power BI - Excelguru to calculate and get correct local date time. Except the suggested website timeapi has gone offline.

  • This Blog: write a Power Automate flow to help us. Because Power Automate has a fairly robust set of Date Time connectors that handles timezone based on the .NET timezone library.

Make our flow

  1. Create a HTTP Request trigger - change the method to GET

  2. Add Current Time

  3. Save the flow once - this will create the GET URL in the HTTP Request

  4. Add two Convert time zone actions - take the current time (in UTC) and convert to the timezone you want.

5. Add a Compose action and create a JSON with three attributes: UTC, Local, SeattleLocal. Since I'm based in Sydney, my "Local" is Australian East timezone.

6. Add a HTTP Response action and put the Compose output in the Body


If you copy and paste the URL and put that into a browser window, you'll see this:

Wonderful the flow is done. Now we go to Data Flow or Data Transformation in Dataset.

Data Set / Data Flow

Conclusion

Lovely, pretty, local time - even when refreshing dataset or data flow from Power BI