How to Push JSON Data into Power BI from Any Workflow
Send JSON rows from any app into a Power BI push dataset with the Power BI REST API and Spojit's HTTP Requests connector, so dashboards update without a gateway, a database or a scheduled refresh.
What This Integration Does
Power BI cannot read JSON from most SaaS apps directly, and the usual workarounds (exporting files, running a gateway, writing a custom connector) are slow to set up and break quietly. A Power BI push dataset is simpler: you define a table once, then any system can add rows to it over the REST API, and reports built on it update as rows arrive. This tutorial sets up that pipe in Spojit: an OAuth connection to Power BI, a one-time step that creates the dataset, and the reusable step that pushes rows. The other "to Power BI" tutorials in this help center (Stripe, Shopify, WooCommerce, Klaviyo) all build on it.
Pushing rows appends; it does not update or deduplicate. Each run should therefore send only rows that are new since the last run, and the dataset's retention policy decides how much history Power BI keeps. With basicFIFO retention Power BI keeps the latest 200,000 rows and drops the oldest.
Prerequisites
- A Power BI Pro or Premium Per User licence, and a workspace you can edit (not My workspace if you want to share reports). The workspace ID is the GUID after
/groups/in the workspace URL. - Permission to register an app in Microsoft Entra ID (or an admin who can do it for you).
- An HTTP Requests connection in Spojit using OAuth 2.0, which you create in Step 1.
Step 1: Register an App and Connect Power BI
In the Microsoft Entra admin center, go to App registrations -> New registration. Add a Web redirect URI of https://miraxa.spojit.com/api/connectors/oauth/callback. Then:
- Under Certificates & secrets, create a client secret and copy its value.
- Under API permissions, add Power BI Service delegated permission
Dataset.ReadWrite.All, and grant admin consent if your tenant requires it. - Copy the Application (client) ID and the Directory (tenant) ID from the app's overview.
In Spojit, go to Connections, add an HTTP Requests connection, set Base URL to https://api.powerbi.com/v1.0/myorg and Auth Method to OAuth 2.0, and fill in:
- Authorization URL:
https://login.microsoftonline.com/YOUR_TENANT_ID/oauth2/v2.0/authorize - Token URL:
https://login.microsoftonline.com/YOUR_TENANT_ID/oauth2/v2.0/token - Client ID and Client Secret from the app registration.
- Scopes:
https://analysis.windows.net/powerbi/api/Dataset.ReadWrite.All offline_access
Click Save & connect and sign in with the Microsoft account that owns the workspace. offline_access gives Spojit a refresh token, so the connection keeps working after the first hour.
Step 2: Create the Push Dataset (Once)
Create a small workflow with a Manual trigger and one Connector node on your Power BI HTTP connection, using http-post:
url:/groups/YOUR_WORKSPACE_ID/datasets?defaultRetentionPolicy=basicFIFObody:{ "name": "Sales feed", "defaultMode": "Push", "tables": [ { "name": "Orders", "columns": [ { "name": "order_id", "dataType": "String" }, { "name": "created_at", "dataType": "DateTime" }, { "name": "customer_email", "dataType": "String" }, { "name": "total", "dataType": "Double" }, { "name": "items", "dataType": "Int64" }, { "name": "source", "dataType": "String" } ] } ] }
Run it once. The response's data.id is the dataset ID; copy it. The dataset now appears in the workspace, and you can build a report on it straight away.
Step 3: Shape Rows to Match the Table
In the workflow that collects your data (a schedule, a webhook or any other trigger), add a Transform node with Iterate over set to the source records, mapping each one to the table's columns:
{
"order_id": "{{ item.id }}",
"created_at": "{{ item.created_at }}",
"customer_email": "{{ item.email }}",
"total": {{ item.total }},
"items": {{ item.item_count }},
"source": "webshop"
}
Name the output rows. Column names must match the table definition exactly, numbers must be numbers rather than strings, and dates should be ISO 8601.
Step 4: Push the Rows
Add a Connector node on the Power BI connection with http-post:
url:/groups/YOUR_WORKSPACE_ID/datasets/YOUR_DATASET_ID/tables/Orders/rowsbody:{ "rows": {{ rows }} }
A 200 status means Power BI accepted the rows. Power BI accepts up to 10,000 rows per request, so for bigger batches split the list with the Array Tools connector's chunk tool and push each chunk in a Loop.
Step 5: Build the Report
In Power BI, open the workspace, select the dataset and choose Create report. Visuals on a push dataset update as new rows arrive, with no refresh schedule to manage. Pin visuals to a dashboard if you want tiles that update live.
Tips
- Send only new rows: because pushes append, filter each run to records created since the previous run, using a lookback slightly longer than the schedule interval and the record ID to drop the overlap.
- One dataset, several tables: add more tables (for example
Refunds) to the same dataset definition so one report can join them. - Need full history or updates? Push datasets cannot update or delete single rows. For data that changes after it is created (order status, refunds), sync it to a database such as MySQL with Spojit and connect Power BI to that database instead.
- Agent Mode: for one-off pushes ("send last month's totals to Power BI"), an Agent Mode step on the same HTTP connection can build the request from a prompt.
Common Pitfalls
- Push datasets are being retired: Microsoft has announced that creating new real-time semantic models, including push datasets, ends on 31 October 2027, with existing ones retired after that (the date may change). For a long-lived reporting pipeline, plan to land the data in a database Power BI reads, and use push datasets for live dashboards.
- Column mismatch: a row with a column the table does not have, or a string in a numeric column, fails the whole request. Keep the Transform and the table definition side by side when you change either.
- Wrong account at consent: the connection acts as the Microsoft user who signed in. That user must have edit rights on the workspace.
- Duplicate rows from re-runs: re-running a schedule over the same window pushes the same rows again. Use the overlap-and-filter pattern above, or accept duplicates and deduplicate in a Power BI measure.
Testing
Push two hand-written rows first from a Manual run and confirm they appear in a table visual in Power BI. Then connect the real source with a short window (the last hour), check the row count against the source system, and turn the schedule on.