Skip to content

Mastodon

Mastodon channels post through the UmbHost.Automate.Mastodon package and its Create Mastodon Status action (mastodon.createStatus). It works with any Mastodon instance.

dotnet add package UmbHost.Automate.Mastodon

An access token for an application on the account’s instance.

  1. On the instance, open Preferences → Development → New application, with the scopes write:statuses and write:media. Copy the access token.

  2. Put it in configuration:

    { "Umbraco": { "Automate": { "Secrets": { "MastodonAccessToken": "..." } } } }

    As an environment variable: Umbraco__Automate__Secrets__MastodonAccessToken.

Automate → Connections → Create → Mastodon. Enter the instance URL, for example https://mastodon.social. Validate checks the token.

Then add the channel as described in Connecting networks.

Option Values Default
visibility public, unlisted, private or direct public

The visibility applies to every post on the channel. Changing it updates the channel’s automation.

Post field Sent as
Text The status text. The link, if any, is added at the end of the text.
Image Optional. A JPEG, PNG, GIF or WebP. The action waits for the instance to process it.
Image alt text Sent.
Link title and description Not sent.

Social counts 500 characters, with each link counting as 23, as most instances do. An instance with a different limit isn’t known to Social. See Network limits.

The status request carries an idempotency key that Mastodon honours for an hour, so a retried request inside the action returns the original status rather than posting twice.