Skip to main content
Version: Next

Customization

Events

The bundle builds its Studio responses through the Pimcore Studio Backend Bundle. Before a response is returned, it dispatches a pre-response event carrying the response object, so you can attach your own data without replacing the controller or the service behind it.

warning

The Studio endpoints of this bundle are marked @internal and change without deprecation. Do not call them from your own code. The pre-response events below are the supported extension point.

See Additional and Custom Attributes in the Studio Backend Bundle documentation for how additional attributes reach the Studio frontend.

All event classes live in Pimcore\Bundle\WorkflowAutomationIntegrationBundle\Event\Studio\PreResponse\.

Event namePayloadDispatched whenUse it to
pre_response.workflow_automation_integration.configuration_itemSchema\ConfigurationItemOnce per Datahub configuration, while building the list of configurations offered for blueprint downloadAdd your own fields to each configuration entry, for example an internal owner or an environment marker
pre_response.workflow_automation_integration.list_optionSchema\ListOptionOnce per option, when the blueprint options of a single configuration are resolvedAnnotate the individual blueprint options offered for a configuration
pre_response.workflow_automation_integration.subscriber_patternSchema\SubscriberPatternResponseWhen the subscriber URL validation pattern is requestedAdjust the regular expression the Studio frontend uses to validate the n8n webhook URL

The first two events are dispatched once per entry, so a listener runs for every item in the list rather than once for the whole response.

Example

Each payload implements AdditionalAttributesInterface, so use addAdditionalAttribute() to attach data. The following listener adds an environment marker to every configuration entry.

<?php

namespace App\EventListener;

use Pimcore\Bundle\WorkflowAutomationIntegrationBundle\Event\Studio\PreResponse\ConfigurationItemEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;

#[AsEventListener(event: ConfigurationItemEvent::EVENT_NAME)]
final class ConfigurationItemListener
{
public function __invoke(ConfigurationItemEvent $event): void
{
$event->getConfigurationItem()->addAdditionalAttribute('environment', 'staging');
}
}