Drupal Integration

5 min read

Prerequisites

  • Drupal 10+
  • A Cacuda account with an API key

Install the Module

Place the cacuda_automod folder into your Drupal installation's modules/custom/ directory.

Enable the module using Drush or the admin UI:

drush en cacuda_automod

Or navigate to Extend in the admin toolbar, find "Cacuda Automod", and enable it.

Configure

Go to /admin/config/services/cacuda-automod and enter:

  • API Key — your Cacuda API key
  • Webhook URL — from your automod's detail page
  • Webhook Secret — used to sign payloads

How It Works

The module subscribes to hook_entity_insert for node and comment entities. When new content is created:

  1. Drupal fires the entity insert event
  2. The module builds a JSON payload from the entity fields
  3. The payload is signed with HMAC-SHA256 using your webhook secret
  4. The signed payload is sent to your Cacuda webhook URL

Create a Drupal Automod

  1. Go to /automod and create a new automod
  2. Add a Drupal trigger node from the palette
  3. Select events: node_insert, comment_insert
  4. Connect detection and action nodes as needed
  5. Save and activate your automod

Test It

Create a new content node in Drupal. The module will send it to your automod for analysis. Check the execution log at your automod's Executions tab to verify the results.

Tip: Create unpublished content first to test your pipeline without affecting your live site.

Callback Actions

When your pipeline reaches an action node, Cacuda calls back to Drupal:

  • Approve — the entity is published
  • Reject — the entity is unpublished

The callback endpoint verifies the HMAC signature before applying any changes.