{"id":77709,"date":"2026-02-18T15:29:31","date_gmt":"2026-02-18T09:59:31","guid":{"rendered":"https:\/\/www.tothenew.com\/blog\/?p=77709"},"modified":"2026-03-02T13:04:51","modified_gmt":"2026-03-02T07:34:51","slug":"automation-in-drupal-with-eca-event-condition-action","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/automation-in-drupal-with-eca-event-condition-action\/","title":{"rendered":"Automating Drupal Workflows with ECA (Event-Condition-Action)"},"content":{"rendered":"<p>Automation plays a crucial role in modern websites by reducing manual work and improving efficiency. In Drupal 7, automation was primarily handled by the Rules module, which allowed site builders to define event-based actions. However, with the transition to Drupal 8 and its new Symfony-based architecture, the Rules module faced technical challenges and could not fully adapt to the new system.<\/p>\n<p>To address this gap, the<strong> ECA (Event\u2013Condition\u2013Action)<\/strong> module was introduced in Drupal 8 and later versions. ECA provides a powerful, flexible, and no-code visual interface for creating automated workflows. It allows site builders and developers to define triggers (events), evaluate conditions, and execute actions without writing custom code. This makes automation more accessible, maintainable, and aligned with Drupal\u2019s modern architecture.<\/p>\n<h2>What is ECA?<\/h2>\n<p>ECA stands for <strong>Event, Condition, and Action<\/strong>. It is an automation tool in Drupal that helps you create workflows easily without coding.<\/p>\n<ul>\n<li><strong>Event:<\/strong>\u00a0Something that happens on the website, like a user logging in or creating a page.<\/li>\n<li><strong>Condition:<\/strong>\u00a0A check to decide whether the action should run, such as checking the user role or content type.<\/li>\n<li><strong>Action:<\/strong>\u00a0What should happen next, like sending an email, showing a message, or updating content.<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2026\/02\/eca_toolbar_bw.png\" alt=\"ECA Toolbar Control\" \/><\/p>\n<p>In simple words, ECA lets you say: <strong>\u201cWhen this happens, and if this is true, then do this.\u201d<\/strong><\/p>\n<h2>ECA modellers<\/h2>\n<p>ECA provides multiple workflow modellers, allowing users to design automation visually. The available modellers include:<\/p>\n<ul>\n<li><strong>BPMN.iO (recommended modeller):<\/strong> A browser-based <strong>BPMN<\/strong> workflow designer built into Drupal\u2019s admin interface, allowing users to easily create automation processes using a simple drag-and-drop system.<\/li>\n<li><strong>Camunda modeller: <\/strong>A standalone desktop tool for designing BPMN workflows outside Drupal, which can later be imported into the system\u2014ideal for building complex processes or working offline.<\/li>\n<li><strong>ECA classic modeller: <\/strong>A simple form-based modeller built on Drupal\u2019s Form API, designed for users who prefer setting up workflows through structured configuration rather than visual diagrams.<\/li>\n<\/ul>\n<h2>Step-by-Step Implementation of ECA<\/h2>\n<p>The Drupal ECA module enables automation by triggering workflows based on user activities. This guide explains how to create a basic ECA workflow using the BPMN.iO modeller, where the system will automatically show a thank-you message whenever a new article is published.<\/p>\n<h3>1. Navigate to the ECA Module<\/h3>\n<ul>\n<li>The installation process for the <strong>ECA (Event\u2013Condition\u2013Action) <\/strong>and<strong> BPMN<\/strong> module is the same as installing any standard Drupal module. You can download them from Drupal.org and enable them through the admin interface or using Drush.\n<ul>\n<li>ECA \u2013 <a href=\"https:\/\/www.drupal.org\/project\/eca\" target=\"_blank\" rel=\"noopener\">https:\/\/www.drupal.org\/project\/eca<\/a><\/li>\n<li>BPMN.iO \u2013 <a href=\"https:\/\/www.drupal.org\/project\/bpmn_io\" target=\"_blank\" rel=\"noopener\">https:\/\/www.drupal.org\/project\/bpmn_io<\/a><br \/>\nPlease note that both modules are mandatory and must be installed and enabled for proper functionality.<\/li>\n<\/ul>\n<\/li>\n<li>Go to your Drupal admin panel.<\/li>\n<li>Click on <strong>Configuration<\/strong>, then select <strong>Workflows<\/strong>, and choose <strong>ECA<\/strong>.<\/li>\n<li>The page will display a list of all existing ECA models.<\/li>\n<li>Click on <strong>\u201c+Add new model\u201d<\/strong> to start creating a new workflow.<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2026\/02\/Screenshot-1-2.png\" alt=\"Access the ECA module\" \/><\/p>\n<h3>2. Exploring the ECA interface<\/h3>\n<p>When you open the ECA modeller, you will notice the following key components:<\/p>\n<ul>\n<li>A visual workflow editor based on the <strong>BPMN.iO<\/strong> modeller, where you design your automation using diagrams.<\/li>\n<li>Different symbols representing workflow elements:\n<ul>\n<li><strong>Event (Start Event) &#8211;<\/strong>\u00a0Shown as a circle, marking where the workflow begins.<\/li>\n<li><strong>Condition (Gateway) &#8211;<\/strong>\u00a0Shown as a diamond, used to check specific criteria before proceeding.<\/li>\n<li><strong>Action (Task) &#8211;<\/strong>\u00a0Shown as a rounded rectangle, representing what the system should do.<\/li>\n<li><strong>Sequence Flow &#8211;<\/strong>\u00a0Arrows that connect events, conditions, and actions in a logical order.<\/li>\n<\/ul>\n<\/li>\n<li>A settings panel on the right side of the screen, where you configure details for each event, condition, or action.<\/li>\n<\/ul>\n<p><strong>Note:<\/strong> Sequence flows may include conditions, but they can also be used without any conditions.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2026\/02\/Screenshot-2.png\" alt=\"Give your model a name\" \/><\/p>\n<h3>3. Give your model a name<\/h3>\n<ul>\n<li>Click on the property panel on the right side of the screen.<\/li>\n<li>In the <strong>Name<\/strong> field, type a clear and meaningful title for your model.<\/li>\n<li>Example: <strong>\u201cShow a thank-you message when a new article is created.\u201d<\/strong><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2026\/02\/Screenshot-3.png\" alt=\"Give your model a name\" \/><\/p>\n<h3>4. Add and configure an event<\/h3>\n<ul>\n<li>Place a <strong>Start Event (circle)<\/strong> on the workflow canvas by dragging it from the toolbar.<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2026\/02\/Screenshot-4.png\" alt=\"Add and configure an event\" \/><\/p>\n<ul>\n<li>Select the circle and enter the title <strong>\u201cArticle has been created\u201d<\/strong> in the property panel.<\/li>\n<li>Click the <strong>\u201c+ Select\u201d<\/strong> button next to the <strong>Template<\/strong> field.<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2026\/02\/Screenshot-5-1.png\" alt=\"Article has been created\" \/><\/p>\n<ul>\n<li>From the list of available templates, select \u201cInsert content entity (After a new entity has been saved).\u201d<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2026\/02\/Screenshot-6.png\" alt=\"apply to the Article content type\" \/><\/p>\n<ul>\n<li>In the settings panel, specify that this event should only apply to the Article content type.<\/li>\n<\/ul>\n<h3>Step 5: Add and configure an action<\/h3>\n<ul>\n<li>Click on the <strong>task (small rectangle)<\/strong> that is linked to your event.<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2026\/02\/Screenshot-7.png\" alt=\"Display a message\" \/><\/p>\n<ul>\n<li>In the property panel, give it the name <strong>\u201cDisplay a message.\u201d<\/strong><\/li>\n<li>Click <strong>\u201c+ Select\u201d<\/strong> next to <strong>Template<\/strong> and pick <strong>\u201cDisplay a message to the user.\u201d<\/strong><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2026\/02\/Screenshot-8.png\" alt=\"Thank you message\" \/><\/p>\n<ul>\n<li>Under <strong>Custom properties<\/strong>, type your message: <strong>\u201cThank you for [node:title]\u201d<\/strong><\/li>\n<li>Because you are using a token, set <strong>Replace tokens = Yes<\/strong> so that the article title appears dynamically.<\/li>\n<\/ul>\n<h3>Step 6: Add and configure a condition<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2026\/02\/Screenshot-9.png\" alt=\"Add and configure a condition\" \/><\/p>\n<ul>\n<li>Click on the<strong> arrow (sequence flow)<\/strong> that connects the event to the action.<\/li>\n<li>In the property panel, enter the name <strong>\u201cShow message only for Content Editors.\u201d<\/strong><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2026\/02\/Screenshot-10.png\" alt=\"Show message only for Content Editors\" \/><\/p>\n<ul>\n<li>Click <strong>\u201c+ Select\u201d<\/strong> next to <strong>Template<\/strong> and choose <strong>\u201cRole of the current user.\u201d<\/strong><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2026\/02\/Screenshot-11.png\" alt=\"Role of the current user\" \/><\/p>\n<ul>\n<li>From the role options in the settings panel, select <strong>\u201cContent Editor\u201d<\/strong>. This makes sure the message is shown only to users who have this role.<\/li>\n<\/ul>\n<h3>Step 7: Save and verify the workflow<\/h3>\n<ul>\n<li>Click the <strong>Save<\/strong> button to finalize and store your ECA model.<\/li>\n<li>Go to <strong>Content \u2192 Add content \u2192 Article<\/strong> and create a new article.<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2026\/02\/Screenshot-13.png\" alt=\"create a new article\" \/><\/p>\n<ul>\n<li>After you save the article, you should see a message on the screen: <strong>\u201cThank you for [node:title]\u201d.<\/strong><\/li>\n<\/ul>\n<p>This basic example shows how ECA can be used to automate actions in Drupal. You can enhance this workflow later by adding additional conditions, actions, or logic to make it more advanced.<\/p>\n<h2>Conclusion<\/h2>\n<p>The ECA module in Drupal, together with BPMN.io, is transforming automation from simple visual workflows into smarter, AI-driven processes. Site builders can now design no-code workflows that integrate AI tools like GPT to automatically generate content summaries, enhance metadata, and detect potential moderation concerns in real time.<\/p>\n<p>With adoption on more than 20,000 websites, BPMN.io-based ECA workflows are becoming increasingly popular. For further learning, you can explore the <a href=\"https:\/\/ecaguide.org\/\" target=\"_blank\" rel=\"noopener\">ECA Guide<\/a>, <a href=\"https:\/\/www.drupal.org\/project\/eca\" target=\"_blank\" rel=\"noopener\">Drupal.org Project Page<\/a>, and <a href=\"https:\/\/bpmn.io\/\" target=\"_blank\" rel=\"noopener\">BPMN.io<\/a> resources.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Automation plays a crucial role in modern websites by reducing manual work and improving efficiency. In Drupal 7, automation was primarily handled by the Rules module, which allowed site builders to define event-based actions. However, with the transition to Drupal 8 and its new Symfony-based architecture, the Rules module faced technical challenges and could not [&hellip;]<\/p>\n","protected":false},"author":1700,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":32},"categories":[3602],"tags":[4862,8363],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/77709"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1700"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=77709"}],"version-history":[{"count":28,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/77709\/revisions"}],"predecessor-version":[{"id":77976,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/77709\/revisions\/77976"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=77709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=77709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=77709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}