mxhdr-mastodon

n8n community node for Mastodon (personal-access-token auth, statuses/accounts/timelines/notifications/media/search/bookmarks/favourites, plus a notifications/bookmarks polling trigger).

Package Information

Released: 2 mo ago
Downloads: 0 weekly / 0 monthly
Latest Version: 0.1.0
Author: Falko Zurell

Documentation

n8n-nodes-mxhdr-mastodon

An n8n community node for Mastodon. Personal-access-token auth
only (no OAuth2 flow), covering statuses, accounts, timelines, notifications, media, search,
bookmarks, and favourites, plus a polling trigger for new notifications and bookmarks. Its
name was deliberately chosen (mxhdr namespaced) to avoid colliding with the already-published
n8n-nodes-mastodon package.

See SPEC.md for the full implementation spec, including the complete
resource/operation tables and the scope this node deliberately leaves out (OAuth2, admin/
moderation endpoints, Lists, Polls-as-a-resource, Filters, Reports, Markers, Suggestions,
Trends, Instance info, streaming).

Icon

The node icon is an original monogram (a purple circle with a white "M"), not the official
Mastodon brand mark — chosen to avoid any trademark ambiguity now that this package is
publicly distributed.

Resources and operations

Resource Operations
Status Create, Get, Update, Delete, Get Context, Favourite, Unfavourite, Boost, Unboost, Bookmark, Unbookmark
Account Get, Get Current User, Update Current User, Get Statuses, Get Followers, Get Following, Follow, Unfollow, Block, Unblock, Mute, Unmute, Search, Get Relationship
Timeline Get Home, Get Public, Get Hashtag
Notification Get Many, Get, Dismiss, Clear All, Get Unread Count
Bookmark Get Many
Favourite Get Many
Media Upload, Get, Update
Search Search

Mastodon Trigger — a polling trigger node with two event types: Notifications
(filterable by type) and New Bookmark. On first activation it establishes a baseline and
emits nothing; subsequent polls emit only new items, oldest-first.

Full per-operation field details are in SPEC.md §5–§6.

Credential setup

  1. On your Mastodon instance, go to Settings → Development → New Application.
  2. Enable the read, write, and follow scopes.
  3. Create the application and copy the generated access token.
  4. In n8n, create a Mastodon API credential with:
    • Instance URL — e.g. https://mastodon.social (no trailing slash)
    • Access Token — the token from step 3

If the token is missing a required scope, API calls will fail with a 401/403 whose message
surfaces Mastodon's own error/error_description explanation.

Development

npm install
npm run build   # compiles TypeScript and copies icons into dist/
npm run lint     # n8n community-node lint rules
npm test         # Jest unit tests (pagination, trigger dedup, status body builder)
npm run dev      # runs a local n8n instance with this node loaded, at localhost:5678

There is no CI pipeline — tests run locally, and anything that needs a real Mastodon instance
should be verified by hand (npm run verify:live, see scripts/live-verify.js) against your
own account. Live verification is not run automatically before publishing.

Installing

Published to the public npm registry, so it installs like any other n8n community node:

  • In-app (recommended): n8n → Settings → Community Nodes → Install a community node →
    enter n8n-nodes-mxhdr-mastodon.
  • Manually: npm install n8n-nodes-mxhdr-mastodon into n8n's custom extensions folder,
    then restart n8n. Useful if your instance's in-app installer is disabled
    (N8N_COMMUNITY_PACKAGES_ENABLED=false).

Publishing an update

npm version <patch|minor|major>
npm run build
npm publish

npm publish targets the default public registry (no publishConfig override) — you'll need
to be logged into an npm account with publish rights on this package
(npm whoami to check, npm login if not). There's no automated release pipeline; this is a
manual step.

Discussion