Power BI icon

Power BI

Work with the Power BI API

Overview

This node integrates with the Power BI API to perform various operations on Power BI resources. Specifically, the Refresh Dataflow operation triggers a refresh of a specified dataflow within a given workspace (also called a group). This is useful when you want to programmatically update or reload dataflows to ensure that reports and dashboards reflect the latest data.

Common scenarios include:

  • Automating data refreshes in Power BI as part of an ETL or data pipeline.
  • Triggering dataflow refreshes after upstream data changes.
  • Managing refresh notifications to monitor success or failure of data updates.

For example, you might use this node to refresh a sales data dataflow every night after your database has been updated, ensuring your Power BI reports show current sales figures.

Properties

Name Meaning
Authentication Method used for authenticating with Power BI API:
- OAuth2
- Bearer Token
Workspace Name or ID The workspace (group) containing the dataflow. You can select from a list or specify an ID via expression.
Dataflow Name or ID The specific dataflow to refresh. Select from a list filtered by the chosen workspace or specify an ID via expression.
Notification Option Email notification preferences for the refresh process:
- No Notification
- Mail on Failure (email sent if refresh fails)
Process Type Type of refresh process to use. Currently only "Default" is supported (optional).

Output

The node outputs JSON data representing the result of the refresh operation. Typically, this includes status information about the refresh request such as whether it was accepted or any error messages returned by the Power BI API.

If the refresh operation supports returning binary data (not indicated here), it would be summarized accordingly, but this node primarily deals with JSON responses.

Dependencies

  • Requires access to the Power BI API.
  • Needs either OAuth2 credentials or a Bearer Token for authentication.
  • Uses dynamic loading methods to fetch available workspaces and dataflows for selection.
  • No additional external dependencies beyond standard n8n credential setup for API authentication.

Troubleshooting

  • Common Issues:

    • Invalid workspace or dataflow ID/name: Ensure the selected workspace and dataflow exist and are accessible with the provided credentials.
    • Authentication failures: Verify that the OAuth2 token or bearer token is valid and has sufficient permissions.
    • API rate limits or throttling: If many refresh requests are made in a short time, the API may reject some requests.
  • Error Messages:

    • "The resource 'dataflow' is not supported!" — This indicates a misconfiguration in resource selection; verify the resource and operation parameters.
    • API errors related to permissions or invalid IDs will be returned from Power BI and surfaced in the node output. Check the error message details for guidance.
  • Resolution Tips:

    • Use the built-in load options to select valid workspaces and dataflows to avoid typos.
    • Confirm that the API credentials have the necessary scopes/permissions for dataflow refresh.
    • Enable "Mail on Failure" notification option to get email alerts on refresh failures.

Links and References

Discussion