Mastodon icon

Mastodon

Interact with Mastodon API

Overview

This node interacts with the Mastodon API, specifically allowing users to manage blocks on Mastodon accounts. The "Block Account" operation under the "Blocks" resource enables blocking a specified account on a given Mastodon instance.

Typical use cases include:

  • Automatically blocking spam or abusive accounts detected in your workflow.
  • Managing block lists programmatically for moderation purposes.
  • Integrating Mastodon account blocking into larger automation workflows, such as social media management or content moderation pipelines.

For example, you could set up a workflow that monitors mentions or follows and automatically blocks accounts based on certain criteria by using this node.

Properties

Name Meaning
Mastodon URL The URL of the Mastodon instance where the block action will be performed (e.g., https://mastodon.social).
Account ID The unique identifier of the Mastodon account to block.

Output

The node outputs JSON data representing the result of the block operation. This typically includes details about the blocked account or confirmation of the block action. The exact structure depends on the Mastodon API response but generally confirms success or provides error 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 instance.
  • Needs the Mastodon instance URL to direct API calls correctly.
  • Relies on the Mastodon API being accessible and the authenticated user having permission to block other accounts.

Troubleshooting

  • Common issues:

    • Invalid or missing Mastodon instance URL can cause connection failures.
    • Incorrect or expired API authentication tokens will lead to authorization errors.
    • Providing an invalid or non-existent Account ID will result in errors from the Mastodon API.
  • Error messages:

    • "The operation "block" for resource "blocks" is not implemented!" — indicates a misconfiguration or unsupported operation; ensure the correct resource and operation are selected.
    • API errors related to authentication or permissions usually indicate problems with the provided credentials or user rights.
  • Resolutions:

    • Verify the Mastodon URL is correct and reachable.
    • Ensure the API key or OAuth token is valid and has necessary scopes.
    • Confirm the Account ID exists on the target Mastodon instance.

Links and References

Discussion