Mastodon icon

Mastodon

Interact with Mastodon API

Overview

This node interacts with the Mastodon API to retrieve timelines based on hashtags. It is useful for monitoring social media content tagged with specific hashtags on a Mastodon instance. For example, it can fetch recent posts containing a particular hashtag, filter posts by local or remote status, or limit results to those with media attachments.

Use Case Examples

  1. Fetch the latest 20 posts tagged with #n8n from a specific Mastodon instance.
  2. Retrieve posts containing a hashtag and filter to show only local posts.
  3. Get posts with a hashtag that include media attachments only.

Properties

Name Meaning
Mastodon URL The URL of the Mastodon instance to connect to.
Hashtag The hashtag to get the timeline for.
Additional Fields Optional filters and parameters to refine the hashtag timeline query, such as local only, remote only, media only, additional hashtag filters (any, all, none), pagination IDs (max_id, since_id, min_id), and limit on the number of results.

Output

JSON

  • json
    • ``
      * id - The unique identifier of each status in the timeline.
      * content - The content of each status (post) in the timeline.
      * created_at - Timestamp when the status was created.
      * account - Information about the account that posted the status.
      * media_attachments - Media attachments included in the status, if any.

Dependencies

  • Requires an OAuth2 API credential for Mastodon authentication.

Troubleshooting

  • Common issues include invalid Mastodon instance URL or network connectivity problems, which may cause API request failures.
  • Errors may occur if the hashtag parameter is missing or invalid.
  • API rate limits imposed by the Mastodon instance may restrict the number of requests.
  • Ensure the OAuth2 credentials are correctly configured to avoid authentication errors.

Links

Discussion