Mastodon icon

Mastodon

Interact with Mastodon API

Overview

This node interacts with the Mastodon API to retrieve notifications from a specified Mastodon instance. It is useful for users who want to programmatically access their Mastodon notifications, filter them by type, or paginate through them. For example, it can be used to fetch all new mentions, follows, or favorites on a Mastodon account for further processing or integration with other workflows.

Use Case Examples

  1. Fetch the latest 20 notifications from a Mastodon instance.
  2. Retrieve all notifications of type 'mention' and 'follow' excluding 'poll' notifications.
  3. Get notifications newer than a specific notification ID to track recent activity.

Properties

Name Meaning
Mastodon URL The URL of the Mastodon instance to connect to, e.g., https://mastodon.social.
Return All Whether to return all notifications or limit the number of results.
Limit Maximum number of notifications to return when 'Return All' is false, with a range from 1 to 40.
Additional Fields Optional parameters to refine the notifications query, including pagination IDs and filtering by notification types or excluding certain types.

Output

JSON

  • id - Unique identifier of the notification.
  • type - Type of the notification, e.g., follow, favourite, mention.
  • created_at - Timestamp when the notification was created.
  • account - Details of the account related to the notification.
  • status - Status object related to the notification, if applicable.

Dependencies

  • Requires an API key credential for Mastodon OAuth2 authentication to access the Mastodon instance.

Troubleshooting

  • Common issues include invalid Mastodon URL or authentication failures due to incorrect or expired OAuth2 credentials. Verify the URL and credentials to resolve these.
  • Error messages about unimplemented operations indicate a mismatch between the selected resource/operation and the node's supported methods. Ensure the resource is set to 'Notifications' and operation to 'Get Notifications'.
  • API rate limits from the Mastodon instance may cause request failures; handle such errors by retrying after some delay or reducing request frequency.

Links

  • Mastodon API Notifications - Official Mastodon API documentation for notifications endpoint, detailing available parameters and response structure.

Discussion