Mastodon icon

Mastodon

Interact with Mastodon API

Overview

This node allows interaction with the Mastodon social network API, specifically enabling operations related to polls when the "Polls" resource is selected. The "View Poll" operation retrieves detailed information about a specific poll on a Mastodon instance.

Typical use cases include:

  • Fetching poll results and metadata for analysis or display.
  • Integrating Mastodon poll data into workflows for reporting or automation.
  • Monitoring poll activity on a Mastodon instance.

For example, you can use this node to get the current status of a poll by its ID from a specified Mastodon server URL, then process or visualize the poll data downstream in your workflow.

Properties

Name Meaning
Mastodon URL The base URL of the Mastodon instance to connect to (e.g., https://mastodon.social).
Poll ID The unique identifier of the poll to view or interact with.

Output

The output JSON contains the full details of the requested poll as returned by the Mastodon API. This typically includes:

  • Poll question text.
  • Options available in the poll.
  • Vote counts per option.
  • Whether the poll is expired or still active.
  • Other metadata such as expiration time and multiple-choice settings.

The node outputs this data as JSON objects, one per input item processed. There is no binary data output for this operation.

Dependencies

  • Requires an API authentication token credential configured for Mastodon OAuth2.
  • Needs the URL of the target Mastodon instance.
  • The node depends on the Mastodon REST API being accessible and the provided credentials having permission to read poll data.

Troubleshooting

  • Common issues:

    • Invalid or missing Mastodon URL will cause connection failures.
    • Incorrect or expired API credentials will result in authentication errors.
    • Providing an invalid Poll ID will lead to errors indicating the poll was not found.
  • Error messages:

    • "The operation "view" for resource "polls" is not implemented!" — indicates a misconfiguration or unsupported operation; ensure correct resource and operation are selected.
    • Network or authentication errors usually indicate problems with the Mastodon instance URL or API credentials.
  • Resolutions:

    • Verify the Mastodon instance URL is correct and reachable.
    • Confirm that the API key or OAuth token is valid and has necessary permissions.
    • Double-check the Poll ID exists on the given Mastodon instance.

Links and References

Discussion