PHPackages                             ernestdefoe/connect - 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. ernestdefoe/connect

ActiveFlarum-extension

ernestdefoe/connect
===================

Automation for Flarum 2 — outgoing webhooks, a scoped REST API, and an in-app if-this-then-that Rules engine. Works with Zapier, Make, IFTTT, n8n and anything that speaks webhooks.

00PHP

Since Jul 24Pushed todayCompare

[ Source](https://github.com/ernestdefoe/connect)[ Packagist](https://packagist.org/packages/ernestdefoe/connect)[ RSS](/packages/ernestdefoe-connect/feed)WikiDiscussions main Synced today

READMEChangelog (2)DependenciesVersions (1)Used By (0)

Connect for Flarum 2
====================

[](#connect-for-flarum-2)

> **Automation for your forum.** Connect gives Flarum 2 outgoing webhooks, a scoped REST API, and an in-app *if-this-then-that* Rules engine. Wire your community up to **Zapier, Make, IFTTT, n8n** — or automate things right on the forum with no external service at all.
>
> Free and **MIT-licensed**.

[![Flarum](https://camo.githubusercontent.com/9077b3c42a524c2ab53f89f5c2b56517167630ed2c73f644dd1684a0c612b299/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f466c6172756d2d322e302532422d6f72616e6765)](https://flarum.org)[![License](https://camo.githubusercontent.com/b8cadaa967891081f8f165695470689986c028821dd8a040132f6e661795dc0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c7565)](LICENSE)[![PHP](https://camo.githubusercontent.com/b994e74a066e26a81c454f22ff2a8d89f8804c8c5af477139eb259c99ac339cd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332532422d373737626234)](https://php.net)

---

What it does
------------

[](#what-it-does)

Connect covers both directions of automation:

- **Out of your forum → anywhere.** When a discussion is started, a reply is posted, or a user registers, Connect fires a signed webhook to whatever URL you (or a Zap) subscribed. Perfect for Zapier/Make/IFTTT/n8n triggers.
- **Anywhere → into your forum.** A scoped API key lets an external service create discussions and replies *as a real user*, through Flarum's own API — so every permission and validation rule still applies.
- **Inside your forum.** The built-in **Rules** engine runs trigger → conditions → actions entirely on your server. No third-party account, no per-task billing, no data leaving the box.

[![The Connect admin page — automation rules, API keys, triggers and live subscriptions](.github/screenshots/connect-admin.png)](.github/screenshots/connect-admin.png)

---

Set it all up without leaving your forum
----------------------------------------

[](#set-it-all-up-without-leaving-your-forum)

Connect embeds Zapier's official experience right in your admin panel. Browse 6,000+ apps, pick a recipe — *Share new discussions to a Facebook Page*, *Post to Slack*, *Add members to Mailchimp* — and build or manage Zaps in place. No tab switching, no developer knowledge required.

[![The in-admin Zapier experience — curated recipes plus the full Zap builder](.github/screenshots/zapier-embed.png)](.github/screenshots/zapier-embed.png)

Connecting takes one API key — there's **nothing to register with Zapier and no developer account needed**. Connect ships its own Zapier integration that every forum shares; because it authenticates per-site (your forum URL + your key), one integration serves everyone. **Admin → Connect** has an *Open Connect on Zapier*button that takes you straight there.

The in-page Zap builder shown above switches itself on once that integration is listed publicly in Zapier's directory — until then you build Zaps in Zapier itself, with everything else working exactly the same.

Prefer Make, n8n, or IFTTT? They all work off the same [REST API](#rest-api) and webhooks — no Zapier account involved.

---

Automation rules (no external service needed)
---------------------------------------------

[](#automation-rules-no-external-service-needed)

Pick a **trigger**, add optional **conditions**, and choose one or more **actions**. Rules run on a queue, off the request path, so they never slow down the person who triggered them.

[![The rule builder — when a new discussion's title contains “help”, post a reply](.github/screenshots/rule-builder.png)](.github/screenshots/rule-builder.png)

**Triggers**

EventFires when`discussion.created`someone starts a new discussion`post.created`someone posts a reply`user.registered`a new member signs up**Conditions** — match **all** or **any** of a list. Each condition compares a payload field (e.g. `title`, `content`, `tagList`) using one of: `is`, `is not`, `contains`, `does not contain`, `starts with`, `is greater than`, `is less than`, `is empty`, `is not empty`, `matches (regex)`.

**Actions**

ActionWhat it doesPost a replyreplies to the discussion the event is aboutAdd / remove a tagrequires [flarum/tags](https://github.com/flarum/tags)Add / remove from a groupchanges the involved user's groupsCall a webhookPOSTs the event payload to a URL you choose> Actions are isolated — if one fails, the rest of the rule still runs — and each rule tracks how many times it has run.

---

Connecting Zapier / Make / IFTTT / n8n
--------------------------------------

[](#connecting-zapier--make--ifttt--n8n)

1. In **Admin → Connect**, create an API key. Give it a label (e.g. *Zapier*) and the scopes it needs — **Read** for triggers, **Write** for actions.
2. Copy the **token** (`ck_…`) and **secret** (`cs_…`).
3. In your automation tool, add a webhook that authenticates with `Authorization: Bearer ck_…`.
    - To **receive** forum events, subscribe your tool's catch-hook URL (Zapier does this automatically via REST Hooks — see the API below).
    - To **act** on the forum, POST to the action endpoints.

Every outgoing delivery is **HMAC-signed** so you can verify it really came from your forum:

```
X-Connect-Signature: sha256=

valid  ⇔  signature == 'sha256=' + hmac_sha256(rawRequestBody, keySecret)

```

---

REST API
--------

[](#rest-api)

All routes are under your forum's API root (`/api`). Authenticate with `Authorization: Bearer ck_…`.

MethodEndpointPurpose`GET``/connect/me`Who this key acts as (auth test)`POST``/connect/hooks`Subscribe: `{ event, targetUrl }` → REST Hook, returns `{ id }``DELETE``/connect/hooks/{id}`Unsubscribe`GET``/connect/samples/{event}`Recent real items shaped like the payload (Zap setup)`POST``/connect/actions/discussions`Create a discussion `{ title, content }``POST``/connect/actions/posts`Reply to a discussion `{ discussionId, content }`A `410 Gone` from a subscribed target auto-prunes the subscription — so a Zap you turn off cleans itself up.

### Example

[](#example)

```
# What does this key act as?
curl https://your-forum.example/api/connect/me \
  -H "Authorization: Bearer ck_live_xxx"

# Create a discussion as the key's user
curl -X POST https://your-forum.example/api/connect/actions/discussions \
  -H "Authorization: Bearer ck_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"title":"Posted from Zapier","content":"Hello from an automation!"}'
```

---

Installation
------------

[](#installation)

```
composer require ernestdefoe/connect
```

Then enable **Connect** in **Admin → Extensions**. Make sure a queue worker is running (`php flarum queue:work`) so webhooks and rule actions are delivered.

The tag actions light up automatically if [flarum/tags](https://github.com/flarum/tags) is installed; everything else works on a stock forum.

Minting a key from the CLI
--------------------------

[](#minting-a-key-from-the-cli)

```
php flarum connect:key "My key" --scopes=read,write
```

---

Requirements
------------

[](#requirements)

- Flarum `^2.0`
- PHP `^8.3`
- A running queue worker (recommended — webhooks and rule actions are queued)

License
-------

[](#license)

[MIT](LICENSE) © Ernest Defoe

###  Health Score

20

—

LowBetter than 12% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c9978664264055711c21fbcf73c937f758df771d9cb40f6a25370b10123e7abc?d=identicon)[ernestdefoe](/maintainers/ernestdefoe)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/ernestdefoe-connect/health.svg)

```
[![Health](https://phpackages.com/badges/ernestdefoe-connect/health.svg)](https://phpackages.com/packages/ernestdefoe-connect)
```

PHPackages © 2026

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