Actions10
Overview
This node integrates with the Dragon Family API to create daily todo tasks for members. It is designed to automate task management by allowing users to create recurring or one-time todos, optionally based on predefined templates. This is useful in scenarios where you want to programmatically assign daily tasks or goals to profiles within the Dragon Family system, such as habit tracking, chore assignments, or goal setting.
For example, you can use this node to:
- Create a daily recurring todo for a group of members to encourage consistent habits.
- Generate a todo from a template that includes predefined rewards and descriptions.
- Assign specific reward points ("dragons") to motivate task completion.
Properties
| Name | Meaning |
|---|---|
| Base URL | The base URL of the Dragon Family API (default: https://api.dragonfamily.com). |
| User Token | Your API access token used for authorization via Bearer token in the HTTP header. |
| Assignees | Comma-separated list of profile IDs to whom the todo will be assigned (e.g., "1001,1002"). |
| Template ID | Optional ID of a todo template to create the todo from. If provided, other fields like Title are ignored. |
| Title | Title of the todo; required if no template ID is specified. |
| Date | Start date of the todo in YYYY-MM-DD format. Omit for undated todos. |
| Week Days | Comma-separated list of integers 0-6 representing days of the week (0=Monday, 6=Sunday) for recurrence. |
| Dragons | Optional reward amount associated with the todo; overrides template reward if specified. |
| Description | Optional textual description of the todo. |
| Image ID | Optional image identifier associated with the todo. |
Output
The node outputs a JSON object representing the response from the Dragon Family API after creating the daily todo. This typically includes details about the created todo item such as its ID, title, assigned profiles, schedule, rewards, and other metadata.
No binary data output is produced by this operation.
Example output structure (simplified):
{
"id": "12345",
"title": "Daily Exercise",
"date": "2024-06-01",
"week_days": [0,1,2,3,4,5,6],
"assignees": [1001, 1002],
"dragons": 10,
"description": "Optional description",
"image": null
}
Dependencies
- Requires an active internet connection to reach the Dragon Family API endpoint.
- Needs a valid API access token for authentication, passed as a Bearer token in the Authorization header.
- The base URL can be customized but defaults to
https://api.dragonfamily.com. - No additional external libraries beyond standard HTTP request helpers provided by n8n.
Troubleshooting
- Invalid or missing API token: The API will reject requests without a valid Bearer token. Ensure your token is correct and has necessary permissions.
- Incorrect Assignees format: Assignees must be comma-separated numeric profile IDs. Non-numeric or malformed input may cause errors.
- Missing required fields: If no template ID is provided, the Title field is mandatory. Omitting it will likely result in an error.
- Date format issues: The date must be in
YYYY-MM-DDformat. Invalid dates may cause the API to reject the request. - Week Days validation: Only integers 0 through 6 are accepted for week days. Values outside this range will be ignored or cause errors.
- API endpoint unreachable: Check network connectivity and ensure the base URL is correct.
- Empty response or unexpected errors: Enable detailed logging or inspect raw API responses to diagnose issues.
Links and References
- Dragon Family API Documentation (Assumed URL for reference)
- n8n HTTP Request Node Documentation
- ISO 8601 Date Format Reference