Actions30
- Dataset Actions
- Document Actions
- Segment Actions
- Metadata Actions
Segment → Update Child
AI-generatedOverview
The node manages segments within a knowledge base dataset, specifically allowing you to update a child segment of an existing segment. This operation is useful when you want to modify the content or metadata of a nested segment in a hierarchical knowledge base structure.
Typical use cases include:
- Refining or correcting information in a subsection (child segment) of a larger segment.
- Updating answers or keywords associated with a child segment for better searchability or accuracy.
- Enabling or disabling specific child segments without affecting the parent segment.
For example, if you have a FAQ stored as segments and sub-segments, you can update the answer or content of a particular child question segment using this node.
Properties
| Name | Meaning |
|---|---|
| Dataset ID | The unique identifier of the dataset containing the segment. |
| Segment ID | The unique identifier of the parent segment to which the child belongs. |
| Child ID | The unique identifier of the child segment to update. |
| Content | The updated textual content of the child segment. |
| Answer | The updated answer text for the child segment, typically used in Q&A formats. |
| Keywords | Comma-separated keywords associated with the child segment for improved search relevance. |
Note: The "Enabled" property is not applicable for the "updateChild" operation.
Output
The node outputs JSON data representing the updated child segment object after the operation completes successfully. This output typically includes fields such as the child segment's ID, updated content, answer, keywords, and other metadata reflecting the changes made.
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.
- Needs the base URL of the Dify API configured in the node credentials.
- Relies on the external Dify Knowledge Base API to perform segment updates.
Troubleshooting
Common issues:
- Invalid or missing Dataset ID, Segment ID, or Child ID will cause the operation to fail.
- Providing empty or malformed content/answer fields may result in incomplete updates.
- Network or authentication errors if API key or base URL are incorrect or expired.
Error messages:
"The operation "updateChild" is not supported for resource "segment": Indicates a misconfiguration or unsupported operation; verify the selected operation.- Errors related to authorization usually mean the API key is invalid or missing.
- Item-specific errors will be reported with the item index for easier debugging in batch operations.
To resolve errors, ensure all required IDs are correct, the API credentials are valid, and the input fields conform to expected formats.
Links and References
- Dify AI Knowledge Base API Documentation
- n8n Documentation on Creating Custom Nodes
- General info on managing hierarchical data structures in knowledge bases