Actions30
- Dataset Actions
- Document Actions
- Segment Actions
- Metadata Actions
Metadata → Update Tag
AI-generatedOverview
The node manages metadata tags within a knowledge base dataset in the Dify AI platform. Specifically, the "Update Tag" operation allows users to modify existing tags associated with datasets by changing their name and/or color.
This node is useful when you want to organize or reclassify metadata tags dynamically as your dataset evolves. For example, if you initially created a tag named "Urgent" but later want to rename it to "High Priority" and change its color for better visual distinction, this operation facilitates that update.
Practical scenarios include:
- Updating tag names to reflect new categorization schemes.
- Changing tag colors to improve UI clarity in downstream applications.
- Maintaining consistent metadata tagging across evolving datasets.
Properties
| Name | Meaning |
|---|---|
| Dataset ID | The unique identifier of the dataset containing the tag to update. |
| Tag ID | The unique identifier of the tag to be updated. |
| Additional Fields | Optional fields to update on the tag: |
| - Name | New name for the tag (string). |
| - Color | New color for the tag, specified as a hex code (e.g., #1890ff). |
Output
The node outputs JSON data representing the updated tag object after the operation completes successfully. This typically includes the tag's ID, updated name, color, and possibly other metadata fields returned by the API.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authenticating requests to the Dify AI knowledge base service.
- The node uses the base URL and authorization token from the configured credentials.
- Network connectivity to the Dify AI API endpoint is necessary.
Troubleshooting
Common issues:
- Invalid or missing Dataset ID or Tag ID will cause the operation to fail.
- Providing invalid color codes (not in hex format) may result in errors or ignored updates.
- Insufficient permissions or expired API keys can lead to authentication failures.
Error messages:
"The operation "updateTag" is not supported for resource "metadata": Indicates a mismatch between selected operation and resource; ensure correct configuration.- Errors related to missing required parameters (Dataset ID, Tag ID) should be resolved by providing valid values.
- API errors returned from the Dify service will be included in the node error message; check the API documentation for specific error codes.
Links and References
- Dify AI Knowledge Base API Documentation (hypothetical link)
- n8n Documentation on Creating Custom Nodes