PHPackages                             import-ai/flarum-webhook-notification - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. import-ai/flarum-webhook-notification

ActiveFlarum-extension[Mail &amp; Notifications](/categories/mail)

import-ai/flarum-webhook-notification
=====================================

Webhook notification channel for Flarum - sends notifications via HTTP webhooks

v0.1.5(3mo ago)022Apache-2.0PHPCI passing

Since Jan 30Pushed 3mo agoCompare

[ Source](https://github.com/import-ai/flarum-webhook-notification)[ Packagist](https://packagist.org/packages/import-ai/flarum-webhook-notification)[ RSS](/packages/import-ai-flarum-webhook-notification/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (9)Used By (0)

Flarum Webhook Notification
===========================

[](#flarum-webhook-notification)

This file provides guidance to developers when working with code in this repository.

Overview
--------

[](#overview)

This is a Flarum extension that adds a webhook notification channel. When notifications are triggered in Flarum, this extension sends them to a configured HTTP endpoint.

Development Commands
--------------------

[](#development-commands)

### Frontend (JavaScript)

[](#frontend-javascript)

```
cd js
npm install          # Install dependencies
npm run dev          # Watch mode for development
npm run build        # Production build
```

Architecture
------------

[](#architecture)

### Backend (PHP)

[](#backend-php)

- `extend.php` - Registers the notification driver, admin frontend, locales, and settings defaults
- `src/Driver/WebhookNotificationDriver.php` - Implements `NotificationDriverInterface`, passthrough all notifications to webhook without filtering
- `src/Job/SendWebhookNotificationJob.php` - Queue job that sends HTTP POST to webhook URL

### Frontend (JavaScript)

[](#frontend-javascript-1)

- `js/src/admin/index.js` - Admin settings page for configuring webhook URL, token, timeout, channel icon, and channel label
- `js/src/forum/index.js` - User notification preferences for enabling/disabling webhook per notification type

### Settings Keys

[](#settings-keys)

- `import-ai-webhook-notification.webhook_url` - Target webhook endpoint
- `import-ai-webhook-notification.webhook_token` - Bearer token for Authorization header
- `import-ai-webhook-notification.timeout` - Request timeout in seconds (default: 30)
- `import-ai-webhook-notification.channel_icon` - Icon class for the notification channel (default: `fas fa-globe`)
- `import-ai-webhook-notification.channel_label` - Label for the notification channel (default: `Webhook`)

### Webhook Payload Structure

[](#webhook-payload-structure)

Passthrough mode sends all notification data without filtering. Model objects are converted to arrays via `toArray()`. Only users who have enabled webhook notifications for the specific notification type are included in the payload.

```
{
  "event": "notification",
  "timestamp": "",
  "type": "",
  "subject_model": "",
  "from_user": { "id": 1, "username": "...", "display_name": "...", "email": "..." },
  "subject": { "id": 1, "discussion_id": 2, "user_id": 1, "...": "..." },
  "data": {},
  "recipients": [
    {
      "id": 1,
      "username": "...",
      "display_name": "...",
      "email": "...",
      "locale": "en"
    }
  ]
}
```

#### Payload Fields

[](#payload-fields)

FieldDescription`event`Always "notification"`timestamp`ISO8601 timestamp of when the notification was triggered`type`Notification type (e.g., `newPost`, `postMentioned`)`subject_model`Class name of the subject (e.g., `Flarum\Post\Post`)`from_user`User who triggered the notification`subject`The notification subject (post/discussion object)`data`Additional data from the blueprint (e.g., `postNumber`)`recipients`Array of users who should receive this notification#### Per-User Locale

[](#per-user-locale)

Each user object in the `recipients` array includes:

- `locale`: The user's preferred locale (e.g., `en`, `zh-Hans`)

If a user's locale preference is not set, the forum's default locale is used.

### User Notification Preferences

[](#user-notification-preferences)

The extension registers a notification preference for each notification type, allowing users to individually enable or disable webhook notifications. By default, webhook notifications are enabled for all notification types. Users can configure these preferences in their account settings.

Git Commit Guidelines
---------------------

[](#git-commit-guidelines)

**Format**: `type(scope): Description`

**Types**:

- `feat` - New features
- `fix` - Bug fixes
- `docs` - Documentation changes
- `style` - Styling changes
- `refactor` - Code refactoring
- `perf` - Performance improvements
- `test` - Test additions or changes
- `chore` - Maintenance tasks
- `revert` - Revert previous commits
- `build` - Build system changes

**Rules**:

- Scope is required (e.g., `sidebar`, `tasks`, `auth`)
- Description in sentence case with capital first letter
- Use present tense action verbs (Add, Fix, Support, Update, Replace, Optimize)
- No period at the end
- Keep it concise and focused

**Examples**:

```
feat(apple): Support apple signin
fix(sidebar): Change the abnormal scrolling
chore(children): Optimize children api
refactor(tasks): Add timeout status

```

**Do NOT include**:

- "Generated with Claude Code" or similar attribution
- "Co-Authored-By: Claude" or any Claude co-author tags

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance82

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

6

Last Release

97d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c6fa04ffefda5bef57e9401b6e723e2a56db702f5ea28b92e039febd0ea050f?d=identicon)[import-ai](/maintainers/import-ai)

---

Top Contributors

[![LucienShui](https://avatars.githubusercontent.com/u/30151093?v=4)](https://github.com/LucienShui "LucienShui (14 commits)")

---

Tags

notificationwebhookflarum

### Embed Badge

![Health badge](/badges/import-ai-flarum-webhook-notification/health.svg)

```
[![Health](https://phpackages.com/badges/import-ai-flarum-webhook-notification/health.svg)](https://phpackages.com/packages/import-ai-flarum-webhook-notification)
```

###  Alternatives

[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[guanguans/notify

Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

682104.9k7](/packages/guanguans-notify)[bentools/webpush-bundle

Send push notifications through Web Push Protocol to your Symfony users.

71274.3k](/packages/bentools-webpush-bundle)[gr8shivam/laravel-sms-api

A modern, flexible Laravel package for integrating any SMS gateway with REST API support

10138.4k](/packages/gr8shivam-laravel-sms-api)[snoeren-development/laravel-discord-webhook-channel

Send notifications to a Discord webhook.

1549.8k1](/packages/snoeren-development-laravel-discord-webhook-channel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
