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:
- Drupal fires the entity insert event
- The module builds a JSON payload from the entity fields
- The payload is signed with HMAC-SHA256 using your webhook secret
- The signed payload is sent to your Cacuda webhook URL
Create a Drupal Automod
- Go to /automod and create a new automod
- Add a Drupal trigger node from the palette
- Select events:
node_insert,comment_insert - Connect detection and action nodes as needed
- 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.