Mastodon icon

Mastodon

Interact with Mastodon API

Overview

This node interacts with the Mastodon API to retrieve timelines from a specified list on a Mastodon instance. It is useful for users who want to programmatically access and process posts (statuses) from a particular curated list of accounts they follow on Mastodon.

Typical use cases include:

  • Aggregating posts from a specific group of users for monitoring or analysis.
  • Automating workflows that respond to new posts in a list timeline.
  • Integrating Mastodon list timelines into other applications or dashboards.

For example, a social media manager could use this node to fetch the latest posts from a list of influencers they follow, then analyze or repost content automatically.

Properties

Name Meaning
Mastodon URL The base URL of the Mastodon instance to connect to (e.g., https://mastodon.social).
List ID The unique identifier of the Mastodon list whose timeline you want to retrieve.
Additional Fields Optional parameters to refine the timeline query:
- Local Only: Show only local statuses.
- Remote Only: Show only remote statuses.
- Media Only: Show only statuses with media attachments.
- Max ID: Return results older than this ID.
- Since ID: Return results newer than this ID.
- Min ID: Return results immediately newer than this ID.
- Limit: Maximum number of results to return (up to 40).

Output

The output is an array of JSON objects, each representing a status (post) from the specified Mastodon list timeline. Each JSON object contains all the data fields returned by the Mastodon API for a status, such as content, author information, timestamps, media attachments, and more.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to a Mastodon instance via its URL.
  • Requires an API authentication token credential configured in n8n to authorize requests to the Mastodon API.
  • The node depends on the Mastodon API's availability and correct credentials to function properly.

Troubleshooting

  • Common Issues:

    • Invalid or missing Mastodon URL can cause connection failures.
    • Incorrect or expired API authentication tokens will result in authorization errors.
    • Providing an invalid or non-existent List ID will lead to empty results or errors.
    • Exceeding the maximum limit (40) may cause the API to reject the request.
  • Error Messages:

    • "The operation "list" for resource "timeline" is not implemented!" — This indicates a misconfiguration or unsupported operation; ensure the operation and resource names are correct.
    • Network or authentication errors typically indicate issues with the Mastodon URL or API credentials.
  • Resolutions:

    • Verify the Mastodon instance URL is correct and accessible.
    • Ensure the API authentication token is valid and has necessary permissions.
    • Double-check the List ID exists and belongs to the authenticated user.
    • Adjust the limit parameter to be within allowed bounds.

Links and References

Discussion