Skip to main content
This example demonstrates how to automatically assign review tasks using the Python SDK after an analysis is completed. You will connect to an existing analysis, export a filtered set of rows from a data table, and assign entry tasks to appropriate MindBridge users based on values in your data, such as company code.

Prerequisites

Complete Get started so the Python SDK is installed and configured. You also need:
  • A MindBridge analysis URL for an engagement that you can access.
  • The logical name of the data table you want to export, such as gl_journal_lines.

Overview

In this guide you will:
  • Parse an analysis URL to extract the MindBridge host and analysis result ID.
  • Authenticate with the MindBridge API and map business keys to user IDs by email for task assignment.
  • Export filtered rows to a CSV file, and create tasks only when no matching task exists (idempotent).

Configure Your Inputs

Adjust the values in the Configure inputs section at the top of the script below to match your analysis and task assignment requirements. Typically, you only need to update that section; the rest of the script follows a standard process.
  • analysis_url: The full MindBridge URL for the analysis. The script parses this to extract the server host and analysis result ID. You can also supply these values directly if your workflow provides them.
  • data_table_query: Filters applied to the data table to identify which rows should receive tasks (for example, by date range or minimum risk). Modify the fields and operators as needed.
  • data_table_logical_name: The logical name of the data table to export. This table must exist in the analysis. The script will print available logical names to help confirm your selection.
  • column_for_assigning: The column whose values determine the assignee, for example, company_code. You must provide a mapping for each expected value.
  • assigned_user_map: A mapping from values in column_for_assigning to MindBridge user email addresses. The script will look up each email and assign the task to the associated user.
The listing below is one continuous script you can save and run. Step boundaries are marked with comments inside the code.

Complete example


When the script finishes, the filtered rows appear as tasks in MindBridge, assigned to the users specified in assigned_user_map. To modify this workflow, adjust the export fields, the data_table_query, or the TaskItem fields (such as audit areas or task type) to fit your organization’s review process.