Actions48
- Account Actions
- Authentication Actions
- Blocks Actions
- Bookmarks Actions
- Favourites Actions
- Featured Tags Actions
- Follow Requests Actions
- Media Actions
- Mutes Actions
- Notifications Actions
- Polls Actions
- Status Actions
- Timeline Actions
Overview
The Mastodon node allows interaction with the Mastodon social network API. Specifically, the "Timeline" resource with the "Get Public Timeline" operation fetches public statuses (posts) from a specified Mastodon instance's timeline. This is useful for monitoring public conversations, tracking trending topics, or aggregating posts from a community without needing user authentication.
Practical examples include:
- Displaying recent public posts from a Mastodon server on a website.
- Collecting posts containing specific hashtags for sentiment analysis.
- Monitoring media-rich posts or filtering local vs remote content in a federated Mastodon environment.
Properties
| Name | Meaning |
|---|---|
| Mastodon URL | The URL of the Mastodon instance to connect to (e.g., https://mastodon.social). This defines which server's public timeline will be accessed. |
| Additional Fields | Optional parameters to refine the timeline query: - Local Only: Show only statuses originating from the local instance. - Remote Only: Show only statuses from remote instances. - Media Only: Show only statuses that contain media attachments. - Any Hashtags: Return statuses containing any of these tags. - All Hashtags: Return statuses containing all of these tags. - None Hashtags: Exclude statuses containing these tags. - Max ID: Return results older than this status ID. - Since ID: Return results newer than this status ID. - Min ID: Return results immediately newer than this status ID. - Limit: Maximum number of results to return (up to 40). |
Output
The node outputs an array of JSON objects, each representing a Mastodon status (post) retrieved from the public timeline. Each JSON object contains detailed information about a status, such as content, author, timestamps, media attachments, and metadata according to the Mastodon API response format.
If multiple statuses are returned, each is output as a separate item in the output array.
The node does not output binary data for this operation.
Dependencies
- Requires an API key credential for authenticating with the Mastodon instance's API.
- Needs the URL of the Mastodon instance to connect to.
- The node depends on the Mastodon API being accessible and the provided credentials having appropriate permissions if required (though public timelines generally do not require authentication).
Troubleshooting
Common Issues:
- Incorrect Mastodon URL: Ensure the URL is valid and points to a reachable Mastodon instance.
- Rate limiting by the Mastodon server: The API may limit requests; consider adding delays or reducing request frequency.
- Invalid or missing API credentials: Although public timelines often don't require authentication, some instances might restrict access.
- Using incompatible or unsupported additional fields for the selected operation.
Error Messages:
"The operation "Get Public Timeline" for resource "timeline" is not implemented!": Indicates a mismatch between selected operation and available methods; verify correct operation name.- Network errors or timeouts: Check internet connectivity and Mastodon server status.
- API errors returned from Mastodon: Review error messages for hints like invalid parameters or permission issues.
Resolving these typically involves verifying input parameters, ensuring proper credentials, and confirming the Mastodon instance's availability.
Links and References
- Mastodon API Documentation - Timelines
- Mastodon Official Website
- n8n Documentation (for general node usage and credential setup)