Skip to main content
Glama

add_activity_to_pipeline

Add custom activities to Microsoft Fabric pipelines using JSON templates for Notebook, Script, Web, or other activity types.

Instructions

Add a generic activity to an existing Fabric pipeline from a JSON template.

Retrieves an existing pipeline, adds an activity from the provided JSON template, and updates the pipeline definition. This is a more general-purpose tool compared to add_copy_activity_to_pipeline, allowing you to add any type of Fabric pipeline activity by providing its complete JSON definition.

Use this tool when:

  • You have a custom activity JSON template to add

  • You want to add activity types beyond Copy (e.g., Notebook, Script, Web, etc.)

  • You need full control over the activity definition

  • You're working with complex activity configurations

Activity JSON Requirements:

  • Must be a valid dictionary/object

  • Must include a "name" field (string)

  • Must include a "type" field (e.g., "Copy", "Notebook", "Script", "Web", etc.)

  • Should include all required properties for the specific activity type

  • Common fields: "dependsOn", "policy", "typeProperties"

Parameters: workspace_name: The display name of the workspace containing the pipeline. pipeline_name: Name of the existing pipeline to update. activity_json: Complete JSON dictionary representing the activity definition. Must include "name", "type", and all required properties.

Returns: Dictionary with status, pipeline_id, pipeline_name, activity_name, activity_type, workspace_name, and message.

Example: ```python # Example 1: Add a Copy Activity from JSON template copy_activity = { "name": "CopyCustomData", "type": "Copy", "dependsOn": [], "policy": { "timeout": "0.12:00:00", "retry": 0, "retryIntervalInSeconds": 30, "secureOutput": False, "secureInput": False }, "typeProperties": { "source": { "type": "AzurePostgreSqlSource", "partitionOption": "None", "queryTimeout": "02:00:00", "datasetSettings": { "type": "AzurePostgreSqlTable", "schema": [], "typeProperties": { "schema": "public", "table": "products" }, "externalReferences": { "connection": "12345678-1234-1234-1234-123456789abc" } } }, "sink": { "type": "LakehouseTableSink", "tableActionOption": "Overwrite", "applyVOrder": True, "datasetSettings": { "type": "LakehouseTable", "typeProperties": { "table": "products" } } } } }

result = add_activity_to_pipeline( workspace_name="Analytics Workspace", pipeline_name="My_Pipeline", activity_json=copy_activity ) # Example 2: Add a Notebook Activity notebook_activity = { "name": "RunTransformation", "type": "Notebook", "dependsOn": [ { "activity": "CopyCustomData", "dependencyConditions": ["Succeeded"] } ], "policy": { "timeout": "1.00:00:00", "retry": 0 }, "typeProperties": { "notebookPath": "/Notebooks/TransformData", "parameters": { "table_name": "products" } } } result = add_activity_to_pipeline( workspace_name="Analytics Workspace", pipeline_name="My_Pipeline", activity_json=notebook_activity ) ```

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_nameYes
pipeline_nameYes
activity_jsonYes

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bablulawrence/ms-fabric-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server