Mastodon icon

Mastodon

Interact with Mastodon API

Overview

The node interacts with the Mastodon API, a decentralized social networking platform. Specifically, for the Account resource and the Get Account Lists operation, it retrieves the lists associated with a particular Mastodon account. This is useful for users who want to programmatically access the collections of accounts that a user has grouped into lists on Mastodon.

Practical examples include:

  • Fetching all lists an account belongs to for analysis or display.
  • Integrating Mastodon account list data into dashboards or other applications.
  • Automating workflows based on the membership of accounts in specific lists.

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 Mastodon account whose lists you want to retrieve.

Output

The output is a JSON array where each item represents a list associated with the specified Mastodon account. Each list object typically contains details such as the list's ID, title, and possibly other metadata defined by the Mastodon API.

If multiple lists are returned, each will be output as a separate JSON object in the node's output array.

Dependencies

  • Requires an API authentication token credential configured in n8n to authenticate requests to the Mastodon instance.
  • The Mastodon instance URL must be provided to direct API calls correctly.
  • No additional external dependencies beyond the Mastodon API and proper OAuth2 credentials.

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 or non-existent Account ID may lead to empty results or errors.
  • Error messages:

    • "The operation "getAccountLists" for resource "account" is not implemented!" — indicates a misconfiguration or unsupported operation; ensure the operation name matches exactly.
    • Network or authentication errors from the Mastodon API will be passed through; verify credentials and network connectivity.
  • Resolutions:

    • Double-check the Mastodon URL and ensure it is reachable.
    • Refresh or reconfigure the API authentication token.
    • Verify the Account ID exists on the target Mastodon instance.

Links and References

Discussion