Power BI icon

Power BI

Work with the Power BI API

Overview

This node enables exporting reports from Power BI workspaces to various file formats. It supports two types of reports: Power BI Reports and Paginated Reports, each with their own export format options. Users can specify the workspace and report by name or ID, choose the export format, and configure additional export settings such as waiting for completion, downloading the file, applying filters, bookmarks, parameters, and Row-Level Security (RLS) identities.

Common scenarios include:

  • Automating report exports for archival or distribution.
  • Generating report snapshots in PDF, PNG, Excel, or other formats.
  • Integrating exported reports into workflows like sending via email or messaging platforms.
  • Applying dynamic filters or bookmarks before export to customize report views.

Example use case:

  • Export a Power BI report as a PDF after applying a default bookmark and specific page filters, then download the file for sharing.

Properties

Name Meaning
Authentication Method of authentication: OAuth2 or Bearer Token.
Workspace Name or ID The target workspace (group) where the report resides. Choose from a list or specify an ID using expressions.
Report Name or ID The report to export. Choose from a list filtered by the selected workspace or specify an ID using expressions.
Report Type Type of report to export: "Power BI Report" or "Paginated Report".
Export Format Format to export the report to. Options depend on the report type:
- Power BI Report: PDF, PNG, PowerPoint (PPTX)
- Paginated Report: Accessible PDF, CSV, Image (BMP, EMF, GIF, JPEG, PNG, TIFF), MHTML, Excel (XLSX), Word (DOCX), PDF, XML
Wait For Completion Whether to wait until the export process completes before returning the result.
Download File If waiting for completion, whether to make the exported file available as binary data and base64 encoded content for further use (e.g., sending via WhatsApp).
Additional Fields Collection of optional fields:
- Maximum Wait Time (seconds): Max time to wait for export completion.
- Polling Interval (seconds): Interval between status checks during export.

Power BI Report Configuration (only if Report Type is Power BI Report)

Name Meaning
Dataset ID ID of an alternative dataset to bind the report to.
Default Bookmark Name Name of a bookmark to apply to the report before export.
Default Bookmark State State of the bookmark to apply.
Export Specific Pages Whether to export only specific pages instead of the whole report.
Identities JSON array defining Row-Level Security identities, e.g., [{"username": "user1@contoso.com", "roles": ["Role1", "Role2"]}].
Include Hidden Pages Whether to include hidden pages in the export.
Locale Locale string (e.g., "en-US") to use for the export.
Pages JSON array specifying pages and optionally visuals to export, e.g., [{"pageName": "ReportSection1", "visualName": "VisualName1"}].
Report Level Filters JSON array of filter configurations to apply at the report level, e.g., [{"filter": "Table1/Column1 eq 'value'"}].
Use Alternative Dataset Whether to bind the report to a different dataset.
Use Default Bookmark Whether to apply a default bookmark to all pages.
Use Identities (RLS) Whether to apply Row-Level Security identities.
Use Report Level Filters Whether to apply filters at the report level.

Paginated Report Configuration (only if Report Type is Paginated Report)

Name Meaning
Format Settings JSON object with format-specific settings, e.g., {"PageWidth": "8.5in", "PageHeight": "11in"}.
Identities JSON array defining Row-Level Security identities, similar to Power BI report.
Locale Locale string (e.g., "en-US") to use for the export.
Parameter Values JSON array of parameter configurations to pass to the report, e.g., [{"name": "Parameter1", "value": "Value1"}].
Use Format Settings Whether to provide format-specific settings.
Use Identities (RLS) Whether to apply Row-Level Security identities.
Use Parameters Whether to provide report parameters.

Output

The node outputs JSON data representing the export operation result. When Download File is enabled and Wait For Completion is true, the output includes:

  • A binary file containing the exported report in the chosen format, accessible for download or further processing.
  • A fileBase64 field containing the base64-encoded content of the exported file, useful for integrations requiring inline file data (e.g., messaging services).

If not downloading the file, the output contains metadata about the export job, such as status and export URLs.

Dependencies

  • Requires access to the Power BI API.
  • Requires authentication via either OAuth2 or a Bearer Token credential configured in n8n.
  • The node uses dynamic loading methods to fetch available workspaces and reports for selection.
  • Proper permissions on the Power BI workspace and reports are necessary to perform export operations.

Troubleshooting

  • Authentication errors: Ensure that the provided OAuth2 or API key credentials have sufficient permissions to access the specified workspace and reports.
  • Invalid workspace or report IDs: Verify that the workspace and report exist and that their IDs or names are correctly specified.
  • Timeouts waiting for export completion: Increase the "Maximum Wait Time" or check the Power BI service status if exports take longer than expected.
  • Malformed JSON in configuration fields: Fields like identities, pages, filters, format settings, and parameters require valid JSON arrays or objects. Invalid JSON will cause errors.
  • Unsupported export format for report type: Confirm that the selected export format matches the report type (Power BI vs Paginated).
  • Row-Level Security issues: Ensure that identity configurations are correct and that the user has permission to apply RLS.

Links and References

Discussion