Actions48
- Account Actions
- Authentication Actions
- Blocks Actions
- Bookmarks Actions
- Favourites Actions
- Featured Tags Actions
- Follow Requests Actions
- Media Actions
- Mutes Actions
- Notifications Actions
- Polls Actions
- Status Actions
- Timeline Actions
Overview
The node enables interaction with the Mastodon API, specifically allowing users to update media items on a Mastodon instance. This is useful for scenarios where you want to modify metadata of uploaded media such as images or videos, for example, adding or updating descriptions for accessibility or adjusting the focus point of an image.
Practical examples include:
- Updating the description of an image to improve accessibility compliance.
- Adjusting the focal point of a media item to control how it is cropped or displayed in Mastodon clients.
Properties
| Name | Meaning |
|---|---|
| Mastodon URL | The URL of the Mastodon instance to connect to (e.g., https://mastodon.social). |
| Media ID | The unique identifier of the media item you want to update. |
| Update Fields | Fields to update on the media item: |
| Description | A text description of the media for accessibility purposes. |
| Focus | Coordinates representing the focal point of the media, formatted as two floating points between -1.0 and 1.0 (x,y), e.g., "0.0,0.0". |
Output
The output JSON contains the updated media object returned by the Mastodon API after the update operation. This typically includes all media metadata such as the media ID, description, focus coordinates, URLs, and other relevant information reflecting the current state of the media item.
The node does not explicitly handle binary data output for this operation; it focuses on metadata updates.
Dependencies
- Requires an API authentication token credential configured in n8n to authenticate requests to the Mastodon instance.
- The user must provide the Mastodon instance URL to direct API calls correctly.
- Network access to the specified Mastodon instance is necessary.
Troubleshooting
Common issues:
- Incorrect or missing Mastodon instance URL can cause connection failures.
- Invalid or expired API authentication tokens will result in authorization errors.
- Providing an invalid Media ID that does not exist on the Mastodon instance will cause errors.
- Improperly formatted focus coordinates (not two floats between -1.0 and 1.0) may be rejected by the API.
Error messages and resolutions:
"The operation "update" for resource "media" is not implemented!"— This indicates a misconfiguration or unsupported operation; ensure the correct resource and operation are selected.- Authorization errors typically indicate issues with the API key or OAuth token; verify credentials and reauthenticate if needed.
- Validation errors from the API about fields like
focusordescriptionsuggest incorrect input formats; check and correct the input values accordingly.