Dries Buytaert: Connecting Drupal with Activepieces

This page is part of my digital garden. It is more like a notebook entry than a polished blog post. It’s a space where I document learnings primarily for my own reference, yet share them in case they benefit others. Unlike my blog posts, these pages are works-in-progress and updated over time. Like tending to a real garden, I periodically refine its content. I welcome suggestions for improvements at dries@buytaert.net.

Drupal ships with JSON:API support, a REST API that exposes your content and data through HTTP requests. This means Activepieces can query your content, fetch individual nodes, explore field definitions, and follow entity relationships without any custom code.
For starters, here is how to install the Drupal AI and ECA integrations:

  • The module is organized using specialized submodules, each connecting to a different part of Drupal’s ecosystem. You can pick and choose the capabilities you want to use.
  • For more advanced scenarios, we created the Orchestration module. It’s an optional module. Installing this module unlocks deeper integrations that enable external systems to trigger Drupal ECA workflows, use Drupal AI agents, call Drupal Tools, and more.

    1. Docker environment: If you are developing Drupal sites locally with tools like DDEV, the easiest option is to run Activepieces locally using Docker so both can communicate easily. See running Activepieces locally with Docker.
    2. drush pm-enable basic_auth -y

      Activepieces is an open source workflow automation platform, similar to Zapier or n8n. It connects different systems so they can work together in automated workflows. For example, you might create a workflow where publishing a Drupal article automatically creates a social media post, updates a Google Sheet, and notifies your team in Slack.

      Setting up basic integration

      Basic Auth sends credentials with each request, which makes it simple to set up. For production environments, I recommend using a more secure authentication method like OAuth, though I have not tried that yet.
      drush pm-enable jsonapi -y

      drush cache-rebuild

      composer require drupal/orchestration drupal/ai drupal/ai_agents drupal/tool drupal/eca
      drush pm-enable ai ai_agents tool eca orchestration_ai_agents orchestration_ai_function orchestration_tool orchestration_eca -y

      There are two main ways to run Activepieces:
      While JSON:API is part of Drupal Core, it may not be enabled yet. You can enable it with:
      Once you have Activepieces running, you’ll want to connect it to your Drupal site. This note explains two ways to do that: a basic integration using Drupal’s built-in APIs, and an advanced setup that unlocks deeper automation capabilities.
      You can connect Drupal with Activepieces without installing any extra Drupal modules.

      Setting up advanced integration

      Development environment: If you want to modify the Activepieces codebase or contribute to the Drupal Piece, you will need the full development toolchain. See setting up the Activepieces development environment.
      Run Activepieces locally: Useful when you are developing or testing Drupal integrations. There are two ways to do this:
      Activepieces can use Basic Authentication to connect to Drupal with the corresponding username and password.
      Activepieces Cloud: The easiest option for production use or for evaluating Activepieces. The limitation is that it cannot reach Drupal sites running on your localhost.
      composer require drupal/ai_provider_anthropic drupal/ai_provider_openai drupal/ai_provider_ollama
      drush pm-enable ai_provider_anthropic ai_provider_openai ai_provider_ollama -y

      Drupal Core comes with a Basic Auth module, but you might also need to enable it:

Similar Posts