event_pipeline
No security coverage
Event Pipeline provides a flexible, plugin-based system for propagating data changes from your Drupal site to external and internal services. Site builders create named pipelines through a configuration UI, attach pluggable process handlers, and trigger them programmatically whenever a value changes. Whether you need to sync user email updates to Auth0, push order data to Shopify, or log field changes for auditing, Event Pipeline gives you a reusable framework so you don't have to write one-off integration code for every external system.
Features
- Named pipelines — Create as many pipelines as you need, each with its own label, description, and set of process handlers. For example, a "User email sync" pipeline that fans out email address changes to multiple services.
- Plugin-based process handlers — Each step in a pipeline is a Drupal plugin. Enable bundled plugins (Auth0, Shopify) or write your own by extending a single base class. Plugins receive the new value, the old value, and an arbitrary context array.
- Sequential and parallel execution — Choose whether processes run one-at-a-time (sequential) or are dispatched through Drupal's Queue API (parallel). Sequential mode isolates failures so one broken step doesn't block the rest.
- Weighted ordering — Drag-and-drop process weights in the admin UI to control the order processes execute.
- Secure credential storage — Plugins that call external APIs can store credentials through the Key module. If Key is not installed, a plain-text fallback is provided automatically.
- Simple service API — Trigger any pipeline with two lines of code:
$service->setEventPipeline('my_pipeline')->broadcastChange($new, $old, $context); - Enable/disable at every level — Toggle entire pipelines or individual processes on and off without removing configuration.
Common use cases:
- Syncing user profile changes (email, name, roles) to identity providers like Auth0 or Okta.
- Pushing customer or order updates to e-commerce platforms like Shopify.
- Logging field-level changes to an external audit trail or analytics service.
- Sending webhook notifications to third-party systems when content changes.
- Fanning out a single data change to multiple downstream services in one consistent pipeline.
Post-Installation
- Grant the "Administer event pipelines" permission to the appropriate roles at Administration > People > Permissions.
- Navigate to Administration > Configuration > Workflow > Event Pipelines (
/admin/config/workflow/pipelines). - Click "Add pipeline". Give it a label (e.g. "User email sync"), choose an execution mode (sequential or parallel), and save.
- On the pipeline list, click "Manage processes" for your new pipeline.
- Click "Add process", select a process plugin from the dropdown, fill in any plugin-specific configuration (API keys, log levels, etc.), set a weight, and save.
- Repeat step 5 to attach as many process handlers as needed.
- In your custom module code, call the pipeline service whenever the relevant data change occurs:
$service = \Drupal::service('event_pipeline.pipeline_service'); $results = $service->setEventPipeline('user_email_sync')->broadcastChange($newEmail, $oldEmail, ['entity' = $user]); - Each process returns a result array with
success,message, and optionaldatakeys, so you can inspect outcomes programmatically.
Additional Requirements
- PHP 8.3 or higher.
- Drupal 10 or 11.
- No additional modules are required for the base module.
Submodule requirements:
- Event Pipeline Auth0 requires the Auth0 and ExternalAuth modules.
- Event Pipeline Shopify requires the
shopify/shopify-apiComposer package (installed automatically via Composer).
Recommended modules/libraries
- Key — Allows process plugins to store API credentials, tokens, and secrets securely instead of in plain-text configuration. The module detects Key automatically and switches credential form elements accordingly.
Similar projects
- Rules — A general-purpose event/condition/action engine. Event Pipeline is narrower in scope: it focuses specifically on broadcasting value changes through a weighted chain of process plugins, with built-in support for parallel execution and secure credential handling. If you need broad event-condition-action workflows, Rules may be a better fit. If you need a lightweight, developer-friendly way to fan out data changes to external services, Event Pipeline is purpose-built for that.
- ECA — Event - Condition - Action, a no-code automation framework. Like Rules, ECA covers a wider range of automation scenarios. Event Pipeline complements ECA by providing a focused, code-first pipeline pattern for service integrations.
- Hook Event Dispatcher — Converts Drupal hooks into Symfony events. This is an event-dispatching layer, not a pipeline execution framework. You could use Hook Event Dispatcher to trigger an Event Pipeline from a Symfony event subscriber.
Supporting this Module
If you find Event Pipeline useful, consider supporting its development:
- Report bugs and suggest features in the issue queue.
- Submit patches or merge requests on Drupal.org.
- Spread the word by writing about your use case or presenting at a Drupal meetup or camp.