Actions10
Overview
The "Create Target" operation in the Dragon Family node allows users to create a new financial or goal-oriented target for a child profile within the Dragon Family system via its API. This is useful for parents or guardians who want to set specific savings or spending goals (targets) for their children, helping them manage allowances or rewards effectively.
Typical use cases include:
- Setting up a new savings goal for a child.
- Defining a target amount that a child should reach based on a predefined template.
- Automating the creation of targets as part of a larger workflow managing children's finances or tasks.
For example, a parent could automate creating a target named "New Bicycle Fund" with a price of $200 linked to their child's profile, using a specific target template ID.
Properties
| Name | Meaning |
|---|---|
| Base URL | The base URL for the Dragon Family API. Default is https://api.dragonfamily.com. |
| User Token | Your API access token, sent as a Bearer token in the Authorization header for authentication. |
| Target Name | The name of the target to be created (e.g., "Bicycle Fund"). |
| Child ID | The unique identifier of the child profile for whom the target is being created. |
| Price | The monetary amount or price associated with the target. |
| Target Template ID | The identifier of the target template to use when creating the target. |
Output
The output JSON contains the response from the Dragon Family API after creating the target. It typically includes details about the newly created target such as its ID, name, price, associated child ID, and other metadata returned by the API.
No binary data output is involved in this operation.
Example output structure (simplified):
{
"id": "target_id",
"name": "Target Name",
"price": 100,
"childId": "child_id",
"targetTemplateId": "template_id",
...
}
Dependencies
- Requires access to the Dragon Family API.
- An API access token must be provided for authorization (sent as a Bearer token).
- The node uses HTTP requests to communicate with the API endpoint at the specified Base URL.
- No additional external dependencies are required beyond standard HTTP connectivity.
Troubleshooting
- Authentication errors: If the API token is missing, invalid, or expired, the request will fail with an authorization error. Ensure the token is correct and has necessary permissions.
- Invalid input data: Missing required fields like Target Name, Child ID, Price, or Target Template ID will cause the API to reject the request. Verify all required properties are correctly set.
- Network issues: Connectivity problems to the Base URL can cause timeouts or failures. Confirm network access and correct Base URL.
- API changes: If the Dragon Family API changes endpoints or request formats, the node may stop working until updated accordingly.
Links and References
- Dragon Family API Documentation (Assumed link; replace with actual if available)
- n8n HTTP Request Node documentation: https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/