Skip to content

Power BI

The Power BI component allows you to connect your automation workflows to Microsoft Power BI. It acts as a bridge to your Power BI resources, enabling you to manage reports, datasets, and workspaces directly within Nappai. You can use this component to automate tasks such as checking report status, validating data resources, or interacting with Power BI services without leaving your dashboard.

How it Works

This component works by securely connecting to the Microsoft Power BI API using the credentials you provide. When you configure the component with identifiers for a workspace, report, or dataset, it communicates with Power BI to perform specific actions on those resources.

The component handles the complex technical details behind the scenes, including authentication, data validation, and error handling. It ensures that the identifiers you provide match the resources in your Power BI environment and returns the result of the interaction along with any relevant data or error messages. This allows you to integrate Power BI operations smoothly into your automated processes.

Connection & Credentials

This component requires configuring a Microsoft Power BI credential in the Nappai panel before it can interact with the service.

  1. Go to the Credentials section in your Nappai panel.
  2. Create a new credential of the type specified for this component and fill in the required fields (API Keys, tokens, etc.).
  3. In your workflow, select the saved credential in the Credential input field of this node.

Inputs

Mapping Mode

This component supports Mapping Mode, which enables dynamic workflows. When enabled, each input field offers three ways to provide data:

  • Fixed: You type the value directly into the field.
  • Mapped: You connect the output of another component to use its result as the value.
  • Javascript: You write Javascript code to dynamically calculate the value.

This flexibility allows you to create workflows where inputs are determined by previous steps or external data sources.

Input Fields

The following fields are available to configure this component:

  • Operation: Select the specific action type for the Power BI interaction.
  • Group ID: Unique identifier of the workspace where the report or dataset is located.
  • Report ID: Unique identifier of the report.
  • Dataset ID: Unique identifier of the dataset.
  • Access Level: Specifies the permission level for the embed token, e.g., “View” or “Edit”.

Outputs

This component produces the following outputs after execution:

  • success: A boolean indicating whether the operation completed successfully.
  • data: The response data returned from Power BI, containing information about the resource or the result of the action.
  • error: Details about any error that occurred, including error messages and codes.

Output Data Example (JSON)json

{ “success”: true, “data”: { “id”: “report-123-abc”, “name”: “Sales Dashboard”, “webUrl”: “https://app.powerbi.com/report?reportId=report-123-abc” }, “error”: null }

Connectivity

This component is designed to integrate into workflows that involve data reporting or business intelligence management.

  • Upstream Connections: It typically receives inputs from components that provide dynamic identifiers or configuration data. For example, you might map the Group ID or Report ID to outputs from a previous component that retrieves a list of available reports or workspaces.
  • Downstream Connections: The outputs can be connected to components that consume the result, such as notification systems, data storage nodes, or decision branches that check the success status or inspect the data for further processing.

Usage Example

Scenario: Verifying Report Accessibility You have a workflow that monitors the health of your daily sales reports. You can use the Power BI component to check if a specific report is accessible and valid.

  1. Set the Group ID to your sales workspace ID.
  2. Set the Report ID to the ID of the report you want to verify.
  3. Set the Access Level to “View” to ensure read-only access.
  4. Connect the component to a notification node that triggers only if the success output is false, alerting you if the report cannot be accessed.

Tips and Best Practices

  • Mapping Mode: Use Mapping Mode to connect input fields to outputs from other components. This makes your workflows more dynamic and adaptable to changing data.
  • Identifier Accuracy: Ensure that Group ID, Report ID, and Dataset ID are correct and match the resources in your Power BI environment. Incorrect IDs will cause the operation to fail.
  • Access Levels: Choose the appropriate Access Level based on your needs. Use “View” for read-only checks and higher levels only when write permissions are required.
  • Error Handling: Always check the error output in your workflow to handle failures gracefully and log issues for troubleshooting.

Security Considerations

  • Credential Management: Store Power BI credentials securely in the Nappai credential vault. Do not share credentials or expose them in workflow configurations.
  • Least Privilege: Use the minimum Access Level required for your tasks. Restrict permissions to “View” whenever possible to reduce security risks.
  • Data Validation: The component validates inputs before execution, but ensure that sensitive data passed to the component is handled according to your organization’s security policies.