This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
This n8n workflow provides automated Power BI dataset refresh capabilities with built-in refresh history monitoring. It triggers a dataset refresh in Power BI and simultaneously checks the refresh history to track data update status. This is perfect for data analysts, business intelligence teams, or anyone who needs to automate Power BI dataset refreshes and monitor their success rates without manual intervention.
Key Features:
- Automated Power BI dataset refresh triggering
- Simultaneous refresh history monitoring
- Manual trigger for on-demand execution
- Real-time status tracking
- Integration with Power BI REST API
- Support for workspace and personal datasets
Step-by-Step Implementation Guide
Prerequisites
Before setting up this workflow, you'll need:
-
n8n instance (cloud or self-hosted)
-
Power BI account (Pro or Premium)
-
Microsoft Azure App Registration for API access
-
Power BI dataset that you want to refresh
Step 1: Set Up Azure App Registration
- Go to Azure Portal
- Navigate to Azure Active Directory → App registrations
- Click New registration
- Configure your app:
-
Name:
n8n-powerbi-integration
-
Supported account types: Accounts in this organizational directory only
-
Redirect URI:
https://your-n8n-instance.com/rest/oauth2-credential/callback
- Click Register
- Note down the Application (client) ID and Directory (tenant) ID
Step 2: Configure App Permissions
- In your app registration, go to API permissions
- Click Add a permission → Power BI Service
- Select Delegated permissions and add:
Dataset.ReadWrite.All
Dataset.Read.All
Workspace.Read.All
- Click Grant admin consent for your organization
Step 3: Create Client Secret
- In your app registration, go to Certificates & secrets
- Click New client secret
- Add description:
n8n-powerbi-secret
- Set expiration (recommended: 24 months)
- Click Add and copy the secret value immediately
Step 4: Configure Power BI API Credentials in n8n
- In n8n, go to Credentials → Add Credential → Power BI OAuth2 API
- Configure as follows:
-
Client ID: Your Application (client) ID from Step 1
-
Client Secret: Your client secret from Step 3
-
Scope:
https://analysis.windows.net/powerbi/api/.default
- Save and test the connection
Step 6: Import and Configure the Workflow
- Copy the provided workflow JSON
- In n8n, click Import from File or Import from Clipboard
- Paste the workflow JSON
- Configure each node as detailed below:
Node Configuration Details:
When clicking 'Execute workflow' (Manual Trigger)
-
Type: Manual Trigger
-
Purpose: Allows manual execution of the workflow
- No configuration needed
Refresh Datasource (Power BI)
-
Resource:
dataset
-
Operation:
refresh
-
Group ID:
me
(for personal workspace) or your workspace ID
-
Dataset ID: Your Power BI dataset ID (from Step 5)
-
Credentials: Select your "Power BI account"
Check Refresh History (Power BI)
-
Resource:
dataset
-
Operation:
getRefreshHistory
-
Group ID:
me
(for personal workspace) or your workspace ID
-
Dataset ID: Your Power BI dataset ID (same as above)
-
Top:
10
(number of recent refresh records to retrieve)
-
Credentials: Select your "Power BI account"
Workflow Flow Summary
-
Manual Trigger → User initiates workflow execution
-
Parallel Execution:
-
Refresh Dataset → Triggers Power BI dataset refresh
-
Get History → Retrieves recent refresh history
-
Results → Both operations complete simultaneously providing:
- Confirmation of refresh initiation
- Historical context of previous refreshes
Contact Information
Robert A Ynteractive
For support, customization, or questions about this workflow:
Need help implementing this workflow or want custom automation solutions? Get in touch for professional n8n consulting and workflow development services.