Habitica icon

Habitica

Habitica API

Overview

This node integrates with the Habitica API, specifically providing functionality to report a chat message within a group. The "Report Message" operation under the "Chat Message" resource allows users to flag inappropriate or problematic messages in a specified group. This is useful for community moderation, ensuring that content adheres to guidelines and maintaining a healthy group environment.

Practical examples include:

  • Automatically reporting spam or abusive messages detected by an external system.
  • Allowing moderators to quickly flag messages directly from an automation workflow.
  • Integrating Habitica group chat moderation into broader team management processes.

Properties

Name Meaning
Group Select the target group where the message to be reported exists. Options:
- List mode: Choose from a list of available groups.
- ID mode: Enter the UUID of the group manually (format: a1abf9df-d89d-4f5e-9e80-26dc3c481042).
Message ID The unique identifier of the chat message to report within the selected group.

Output

The node outputs JSON data representing the result of the report message action. Typically, this will include confirmation of the report submission or any relevant response from the Habitica API indicating success or failure.

If the node supports binary data output, it would relate to any attachments or media associated with the chat message, but based on the provided code and properties, the primary output is JSON confirming the report status.

Dependencies

  • Requires an active connection to the Habitica API.
  • Needs an API authentication token credential configured in n8n to authorize requests.
  • The base URL for the API can be either the default Habitica API endpoint or a self-hosted instance, configurable via credentials.

Troubleshooting

  • Invalid Group ID format: If the entered group ID does not match the UUID regex pattern, the node will reject it. Ensure the ID follows the correct UUID format.
  • Missing required fields: Both "Group" and "Message ID" are mandatory. Omitting either will cause errors.
  • API authentication errors: If the API key or token is invalid or missing, the node will fail to authenticate. Verify credentials in n8n settings.
  • Network or API downtime: Temporary connectivity issues or Habitica API outages may cause request failures. Retry after some time.
  • Permission issues: The authenticated user must have permission to report messages in the specified group; otherwise, the API will return an authorization error.

Links and References

Discussion