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.MastodonWhat Mastodon needs
Section titled “What Mastodon needs”An access token for an application on the account’s instance.
-
On the instance, open Preferences → Development → New application, with the scopes
write:statusesandwrite:media. Copy the access token. -
Put it in configuration:
{ "Umbraco": { "Automate": { "Secrets": { "MastodonAccessToken": "..." } } } }As an environment variable:
Umbraco__Automate__Secrets__MastodonAccessToken.
The Automate connection
Section titled “The Automate connection”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.
Channel options
Section titled “Channel options”| 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.
What is sent
Section titled “What is sent”| 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.
When a post fails
Section titled “When a post fails”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.