Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Mautic ECA

1 sites No security coverage
View on drupal.org

This module allows Drupal to react to Mautic marketing automation events. It enables Drupal automation models to receive Mautic webhooks and perform actions like creating, updating, or managing contacts and segments within Mautic using its API.

Introduction

Mautic ECA integrates the ECA module in Drupal with the
Mautic marketing automation platform.
It allows Drupal automation models to react to Mautic webhooks and perform actions such as creating,
updating, retrieving, or managing contacts and segments using the Mautic API.

Requirements

  • Drupal core: ^10 || ^11
  • Modules:
    • eca (^2.1)
    • mautic_api (^2.0)
  • Recommended: token (for a better token UI in ECA)

Installation

Install this module as you would any other Drupal module.

With Composer:

composer require drupal/mautic_eca

Then enable the module and its dependencies from the Drupal admin UI or using Drush.

Configuration

  1. Create at least one Mautic API Connection using the mautic_api module.
  2. Configure one or more Mautic Webhook configurations using the mautic_api module,
    and point your Mautic instance to the provided webhook URL.

Available ECA Event

  • Mautic: Webhook Received
    • Triggers whenever a webhook payload is received from Mautic.
    • Provides a token (default name: webhook_data) containing the raw webhook payload.

Available ECA Actions

Contacts

  • Mautic: Create Contact — Create a contact from JSON input.
  • Mautic: Update Contact — Update a contact by Mautic ID using JSON input.
  • Mautic: Delete Contact — Delete a contact by Mautic ID.
  • Mautic: Get Contact — Retrieve a contact by Mautic ID.
  • Mautic: List Contact — Search and list contacts with paging and sorting options.
  • Mautic: Add Contact to Do Not Contact — Add a contact to DNC with channel, reason, and comments.
  • Mautic: Remove Contact from Do Not Contact — Remove a contact from DNC.

Segments

  • Mautic: Create Segment — Create a segment from JSON input.
  • Mautic: Update Segment — Update a segment by Mautic ID using JSON input.
  • Mautic: Delete Segment — Delete a segment by Mautic ID.
  • Mautic: Get Segment — Retrieve a segment by Mautic ID.
  • Mautic: List Segments — Search and list segments.
  • Mautic: Add Contact to Segment — Add a contact to a segment.

All actions require selecting a Mautic API connection and optionally storing the API response
in a named token for use later in the ECA model.

Also check: https://ecaguide.org/plugins/mautic_eca/

JSON Examples

Some actions require JSON input. Refer to the
Mautic API documentation
for complete field specifications.

Create Contact

{
  "firstname": "John",
  "lastname": "Doe",
  "email": "[email protected]",
  "company": "Acme Corp",
  "phone": "+1234567890",
  "tags": ["lead", "newsletter"],
  "customFields": {
    "custom_field_1": "Value 1",
    "custom_field_2": "Value 2"
  }
}

Update Contact

{
  "firstname": "Jane",
  "lastname": "Smith",
  "email": "[email protected]",
  "company": "New Company",
  "tags": ["customer", "vip"]
}

List/Search Contacts

  • Search filter: email:[email protected]
  • Start: 0
  • Limit: 30
  • Order by: date_identified
  • Sort direction: ASC or DESC
  • Published only: true / false
  • Minimal: true / false

Create Segment

{
  "name": "Newsletter Subscribers",
  "description": "Users who subscribed to our newsletter",
  "isPublished": true,
  "filters": [
    {
      "glue": "and",
      "field": "email",
      "object": "lead",
      "type": "text",
      "operator": "isNotNull"
    }
  ]
}

Update Segment

{
  "name": "Updated Newsletter Subscribers",
  "description": "Updated description",
  "isPublished": true
}

List/Search Segments

  • Search filter: name:newsletter
  • Start: 0
  • Limit: 30
  • Order by: name
  • Sort direction: ASC or DESC
  • Published only: true / false
  • Minimal: true / false

API Documentation

Activity

Total releases
8
First release
Jun 2025
Latest release
8 months ago
Releases (12 mo)
6 ▲ from 2
Maintenance
Slowing

Release Timeline

Releases

Version Type Release date
1.0.6 Stable Nov 6, 2025
1.0.5 Stable Oct 23, 2025
1.0.4 Stable Oct 6, 2025
1.0.3 Stable Oct 3, 2025
1.0.2 Stable Sep 16, 2025
1.0.1 Stable Aug 12, 2025
1.0.0 Stable Jul 7, 2025
1.0.x-dev Dev Jun 16, 2025