Only in Mage Pro.Try our fully managed solution to access this advanced feature.

How Global Hooks Work
Global Hooks can be triggered at two different points during the execution of a pipeline:- Pre-completion of a Block: The hook will run before a specific block in the pipeline is executed.
- Post-completion of a Block: The hook will run after a specific block in the pipeline has completed execution.
Configuring Global Hooks
The Global Hooks UI in Mage provides several configuration options to customize the behavior of your hooks. Here’s a breakdown of the available settings: Hook UUID: A unique identifier for the hook. This is used to reference the hook within your pipelines. Resource Type: The type of API resource that the hook is attached to (e.g., Pipeline, Dataset, etc.). Operation Type: The operation that triggers the hook (e.g., Create, Update, Delete).Targeting Conditions
The Targeting Condition fields in the Global Hooks UI allows you to specify a set of conditions that determine which subset of pipelines the hook should run on. This feature gives you control over the hook’s execution of a subset of features.When to Run a Hook
Before/After Operation Toggles: Toggles to specify whether the hook should run before or after the operation. Run if Operation Succeeds/Fails Toggles: Toggles to specify whether the hook should run only if the operation succeeds or fails.Code to Run
When a hook is triggered, it will execute the pipeline that was selected in the pipeline to execute dropdown. Pipeline to Execute: The pipeline that will be executed when the hook is triggered. Valid Code Snapshot: A snapshot of the pipeline code that validates the hook before it runs.When making a code change to the pipeline, you have to re-validate the global hook by clicking the “Create snapshot” button
How to Run a Hook
Stop Operation if Hook Fails Toggle: If enabled, the operation will be stopped if the hook fails. Execute Hook with History and Logging Toggle: If enabled, the hook’s execution will be logged and recorded in the history.Toggling on the history and logging feature will significantly degrade performance of the of the operations resolution time.