How to trigger a pipeline
There are 2 ways you can trigger a pipeline from code:Block template
Add a data loader or data exporter block template namedOrchestration → Trigger pipeline.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
You can trigger another pipeline from a block within a different pipeline.
Orchestration → Trigger pipeline.
from mage_ai.orchestration.triggers.api import trigger_pipeline
trigger_pipeline(
'pipeline_uuid',
variables={},
check_status=False,
error_on_failure=False,
poll_interval=60,
poll_timeout=None,
verbose=True,
)
| Parameter name | Description | Default | Sample | Required |
|---|---|---|---|---|
pipeline_uuid | The UUID of the pipeline to trigger. | example_pipeline | ✅ | |
variables | Runtime variables for the pipeline. | {} | { 'env': 'dev' } | |
check_status | Poll and check the status of the triggered pipeline. | False | False or True | |
error_on_failure | Raise an exception if the triggered pipeline fails. | False | False or True | |
poll_interval | Check the status of triggered pipeline every N seconds. | 60 | 300 | |
poll_timeout | After N seconds have elapsed, raise an exception if the triggered pipeline hasn’t finished running successful. | None | 3600 | |
verbose | Print status of triggered pipeline run. | True | False or True |
Was this page helpful?