Habitica Trigger icon

Habitica Trigger

Handle Habitica events via webhooks

Overview

This node acts as a trigger for various Habitica events by receiving webhooks from the Habitica API. It listens for specific user activities such as task scoring, creation, updates, deletions, group chat messages, quest progress, pet hatching, mount raising, and leveling up. When one of these events occurs in Habitica, the node activates and outputs the event data.

Common scenarios where this node is useful include:

  • Automating workflows based on task changes (e.g., sending notifications when a task is scored or updated).
  • Responding to group chat messages in Habitica groups.
  • Tracking quest progress or user achievements to update external systems.
  • Integrating Habitica activity with other apps for productivity or gamification purposes.

For example, you could use this node to trigger an email notification whenever a specific task is completed or to log quest completions into a database.

Properties

Name Meaning
Event The type of Habitica event to listen for. Options include: Task Scored, Task Created, Task Updated, Task Deleted, Group Chat Message Received, Quest Started, Quest Finished, Quest Invited, Pet Hatched, Mount Raised, Leveled Up.
All Tasks (Shown only for Task Updated, Task Deleted, Task Scored events) Whether to receive webhooks for all tasks or only for a specified task ID.
Task (Shown only if "All Tasks" is false and event is one of Task Updated, Task Deleted, Task Scored) Select a specific task by listing or entering its ID. The trigger will only fire for this task.
Group (Shown only for Group Chat Message Received event) Select a specific group by listing or entering its ID. The trigger will only fire for messages received in this group.

Output

The node outputs the JSON payload received from the Habitica webhook corresponding to the selected event. This JSON contains detailed information about the event, such as task details, message content, quest info, or user activity depending on the event type.

If the event relates to a task, the output includes the task object with its properties. For group chat messages, it includes message details and group info. For quests and user activities, relevant event data is provided.

The node does not output binary data.

Dependencies

  • Requires an active Habitica API credential configured in n8n to authenticate requests.
  • The node registers and manages webhooks via the Habitica API, so the user must have appropriate permissions in their Habitica account.
  • No additional external services are required beyond Habitica's API.

Troubleshooting

  • Webhook Not Triggering: Ensure that the webhook URL registered in Habitica matches the URL exposed by your n8n instance. Also, verify that the correct event is selected and that any task or group filters match the incoming event.
  • Task ID Validation Error: When specifying a task ID manually, ensure it matches the UUID format (e.g., a1abf9df-d89d-4f5e-9e80-26dc3c481042), otherwise the node will reject it.
  • Unsupported Event Error: If the node configuration references an event not supported by the internal event definitions, it will throw an error. Make sure to select from the provided event options.
  • Permission Issues: The Habitica API credentials must have permission to create and delete webhooks. Lack of permissions can cause webhook registration failures.
  • Multiple Webhooks: If multiple instances of this node are used with the same workflow, ensure each has a unique webhook path or they may interfere with each other.

Links and References

Discussion