Power BI and Power Automate

Power Automate is a tool created by Microsoft that could be used for automation of so many workflows. Here, we will provide an example of using Power Automate to fetch an online data for position of space station (extracting latitude, longitude, etc.) from a JSON API. In order to access Power Automate, you can login into the https://flow.microsoft.com/ website by using your Clemson University username and password.

Now choose Create to create a new automated workflow:

In the opened window, just click on Skip and go to the next window opened after that:

We want to fetch the data every 1 minute. So we need to have a scheduler to run the workflow every minute for us:

Then click on Recurrence and choose 1 minute to run the workflow:

Now, click on New Step and search for HTTP and put the address of the JSON API as: http://api.open-notify.org/iss-now.json into the URL and put the method as GET:

After that choose Parse JSON and put the Body into the content and click on Generate from sample and put this sample message and click on Done:

{"iss_position": {"longitude": "171.7565", "latitude": "40.4162"}, "timestamp": 1620413415, "message": "success"}

Now, go to Power BI and click on creating a new streaming dataset. Choose API and click on Next. Choose a name for your dataset such as Where is space station and put Message as text, Timestamp as date, Latitude and Longitude as numbers. Finally click on Create.

Finally, search for Power BI in Power Automate and click on Add rows to a dataset. Put My Workspace in the Workspace option. Also choose Where is space station as Dataset and RealTimeData for Table. Put message into the Message field. Put addHours(utcNow(),4) into the timestamp and latitude and longitude into their corresponding fields:

Finally click on Save. Now go back to Power BI and click on Where is space station in your Dataset field and create a Map visualization by using Longitude and Latitude fields which would be updated automatically every 1 minute: