This project is not covered by Drupal’s security advisory policy.

Connector Hub Notify answers one question for any module built on Connector Hub: "something just happened, how do I tell a human?" Instead of every domain wiring its own connection to Slack, email, or whatever channel a site actually uses, it depends on this module's one generic notification capability, and you configure which real channel actually receives it.

This exists for the same reason Connector Hub Auth exists on the authentication side: once a second domain needed the exact same "tell someone something happened" logic that a first domain already had, hand-wiring a bespoke connection a second time was the wrong move. A connector implements this module's interface once, and any other module can notify through it without ever knowing which channel is on the other end.

Features

  • One capability interface (NotifierInterface) a connector implements to become a valid notification target. Connector Hub Slack implements it today, delegating to its own Slack API call.
  • A single injectable service (NotificationDispatcher) any module calls with just a message, plus optional routing hints specific to the configured connector. It resolves the configured endpoint, checks that it actually implements the interface, and sends.
  • Fails safe: a missing configuration or a failed send is logged and reported back as a simple pass/fail, never thrown as an exception into the calling module's own logic. A notification going wrong should never be the reason an unrelated operation fails.
  • A settings form to choose which Connector Endpoint actually receives notifications, so the choice lives in one place instead of being hardcoded into every module that wants to notify someone.

Post-Installation

  1. Enable this module, plus a module that provides a connector implementing NotifierInterface (today, that means Connector Hub Slack).
  2. Set up that connector's own Connector Endpoint first (API key, channel, whatever that specific connector needs).
  3. Go to Configuration › Web services › Connector Hub Notify, and choose which endpoint should receive notifications.
  4. That's the entire configuration surface. This module does not add a content type, a text format, or any other new concept to your site; it only adds the "notify" primitive that other Connector Hub modules call into.
  5. This module does nothing on its own beyond that. It becomes useful once another module calls NotificationDispatcher, for example Connector Hub AI telling you a generated draft is ready.

Additional Requirements

  • Connector Hub, the core framework this module is built on. Nothing else is required beyond Drupal core.
  • At least one module providing a connector that implements NotifierInterface, for a notification to actually go anywhere. Without one, this module has nothing to notify through.

Connector Hub Slack, the only module today that implements NotifierInterface, so a notification configured here actually reaches someone.

Similar projects

Several modules send notifications to a specific channel directly (a Slack-posting module, a generic webhook-on-event module, and so on). Connector Hub Notify is not one of those; it does not talk to any channel itself. It is the generic primitive a Connector Hub connector implements, so that any other Connector Hub domain can notify a human without being written against a specific channel at all. Pick a channel-specific module if you only ever need that one channel; pick this one if you're building on Connector Hub and want "notify someone" to stay independent of which channel that ends up being.

Supporting this Module

No sponsorship links at this time.

Community Documentation

See this project's README.md, CONTRIBUTING.md, and ROADMAP.md for the architecture and the reasoning behind the design.

The full Connector Hub architecture, including how this module fits alongside the other domains, is documented at connector-hub.porschmann.be.

Project information

Releases