Drupal is a registered trademark of Dries Buytaert

mautic_eca

3 sites No security coverage
View on drupal.org

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
3 months ago
Release cadence
20 days
Stability
88% stable

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