Mastodon icon

Mastodon

Interact with Mastodon API

Overview

The node provides integration with the Mastodon social network API, specifically allowing interaction with user accounts. The "Pin Account" operation under the "Account" resource enables users to pin a specific account on their Mastodon instance. Pinning an account typically highlights or prioritizes that account in the user's interface, making it easier to access or follow.

This node is beneficial for automating social media management tasks on Mastodon, such as programmatically highlighting important accounts, managing followers, or customizing user experience on Mastodon instances.

Practical example:

  • Automatically pin a partner or influencer's account on your Mastodon instance to keep their posts prominently visible.
  • Use in workflows that manage multiple Mastodon accounts to maintain consistent pinned accounts across profiles.

Properties

Name Meaning
Mastodon URL The URL of the Mastodon instance to connect to (e.g., https://mastodon.social).
Account ID The unique identifier of the account to be pinned on the Mastodon instance.

Output

The output is a JSON object representing the result of the pinning operation. This typically includes details about the pinned account or confirmation of the action performed. The exact structure depends on the Mastodon API response but generally contains account metadata and status information.

No binary data output is involved in this operation.

Dependencies

  • Requires an API authentication token credential configured in n8n to authenticate requests to the Mastodon API.
  • Needs the base URL of the Mastodon instance to connect to, which must be provided as an input property.
  • Relies on the Mastodon API being accessible and the authenticated user having permission to pin accounts.

Troubleshooting

  • Common issues:

    • Incorrect or unreachable Mastodon URL can cause connection failures.
    • Invalid or missing account ID will prevent the operation from succeeding.
    • Insufficient permissions for the authenticated user to pin accounts may result in authorization errors.
  • Error messages:

    • "The operation "pinAccount" for resource "account" is not implemented!" — indicates a misconfiguration or unsupported operation; ensure the correct operation name is used.
    • Network or authentication errors typically indicate problems with credentials or instance URL.
    • API errors returned by Mastodon (e.g., 403 Forbidden) suggest permission issues; verify the API token scopes.
  • Resolution tips:

    • Double-check the Mastodon instance URL and ensure it is correct and reachable.
    • Verify the account ID exists and is valid on the target instance.
    • Confirm the API key has necessary permissions to perform account pinning.
    • Enable "Continue On Fail" in the node settings to handle errors gracefully during batch operations.

Links and References

Discussion