![Frederik Wouters](/sites/default/files/styles/user_profile_thumbnail/public/2024-05/Frederik-Wouters-2-cropped%20noteeth%20zoomed-small.jpg?h=57739094&itok=jG5dswQF)
Frederik Wouters
Hello Drupal fanatics! Welcome to “Drupal & AI Adventures. In this series, we explore the fantastic world of Drupal modules powered by artificial intelligence. Our mission? We want to inspire and enlighten YOU. We'll dive in together! This time we're talking about adding ECA and ChatGPT in flows.
ECA is a no-code solution that allows you to orchestrate your Drupal site. Integrated with graphical user interfaces such as BPMN.iO, Camunda, ECA Classic Modeller or other possible future modellers, ECA is a robust system for building conditionally triggered action sets.
ECA is triggered for each Drupal event. It validates these events against event-condition-action models and processes all models for the current event. ECA models are stored in config, so they can be imported and exported via the admin UI or Drush.
If you want to read more about ECA, be sure to check out the ECA guide.There is a lot of interesting information, as well as a library of downloadable ECA models and video tutorials.
ECA is currently integrated with the following modellers:
So with ECA you can put together a lot of things that until now modules were made for.
An example:
“After login, if I have a certain role, I want users to be redirected to a certain dashboard. “
There are modules that do this (e.g. redirect_after_login or user_redirect or login_destination) that are used on a lot of sites (these 3 modules alone on 48000+ sites).
We see in many places that developers build this custom.
The need for this is completely eliminated with ECA. The functionalities in these modules or custom code can also be implemented in a no-code way with ECA.
An example flow after login on ECA (this flow does the login redirect and much more, check the diagram).
https://www.drupal.org/project/eca
Thanks to the module prompt, you can add AI prompts as no-code actions.
This allows you to do the following:
The ECA module is complex and certainly overwhelming at first. But it is enormously powerful. It is also supported by some very active people in the community. Definitely worth checking out!
The Prompt module (which enables prompts in ECA) was built by a maintainer and is not yet stable. It is rather experimental and can be evaluated in limited use cases. There is still work to be done here to achieve a stable version.
De Openai module heeft ook een submodule "openai_eca" Je kan dus met de Openai module en de ECA module AI-powered flows maken. Dan is de prompt module niet nodig.
Deze module geniet overigens ook van betere community support.