Microsoft Power BI is a powerful tool for creating reports & visualizations.
This guide describes the steps needed to get OpenTrack data streaming into Power BI from your account.
Note that this integration is somewhat complex and technical. We'll do our best to make it simpler in future versions đ
Here's what you'll need:
An OpenTrack API Key
Access to Power BI
Access to Microsoft Power Automate HTTP (depending on your subscription, this may or may not be available by default
Step 1: Configure Power BI
First you'll want to configure a dataset in Power BI to house your OpenTrack data.
Create a new Streaming dataset:
Select "API":
Give your dataset a name, e.g. âOpenTrack Receiving Datasetâ, enable âHistoric data analysisâ, and add some columns that you're interested in storing:
Now click "Create".
Step 2: Configure Power Automate
Log into Power Automate and create a new "Instant Cloud Flow"
Enter a name for the flow, scroll down and choose the âWhen an HTTP request is receivedâ trigger (Premium). Now click âCreateâ:
Set up the trigger in order for it to understand the incoming payload. Expand the âWhen a HTTP request is receivedâ pane and click on âUse sample payload to generate schemaâ, paste an OpenTrack API payload example and click âDoneâ:
Now, add an action step which would push data from the payload to a Power BI dataset. Click on â+ New stepâ, type âadd rows to datasetâ in the search field and choose âAdd rows to a datasetâ Power BI action:
Choose your Power BI workspace, Dataset and the table âRealTimeDataâ. A list of table columns will appear:
Click inside the first column text field, a suggestion will appear on the right side . If it doesnât appear, click âAdd dynamic contentâ. In the Dynamic content window choose the name of the property from the incoming payload that you would like to map to the destination schema in Power BI:
Map the rest of the dataset columns to OpenTrack request payload properties and click âSaveâ:
Now, expand the âWhen a HTTP request is receivedâ trigger and copy the URL. This is the url that you will configure as a webhook in your OpenTrack account.
If you have Postman, or any other HTTP Client, you can test out the Flow by making a request with the OpenTrack payload to the url you copied:
Step 3: Configuring Webhooks
Now you can take the url you copied from Power Automate, and use it to register a webhook in your OpenTrack account.
curl --location --request POST 'https://api.opentrack.co/v1/webhooks' \
--header 'Opentrack-API-Key: YOUR_API_KEY \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "YOUR_POWER_AUTOMATE_URL,
"name": "Power BI Webhook"
}'
That's it! Now when important changes occur in your data, OpenTrack will post a webhook and Power Automate will forward it onto Power BI in the correct format.
Have fun!