Actions58
- Applications Actions
- Components Actions
- Brands Actions
- Documents Actions
- Weblinks Actions
- Manufacturers Actions
- Catalogs Actions
- Download Actions
- Variations Actions
- Categories Actions
- Upload Actions
- Jobs Actions
Overview
This node integrates with the iTwin Component Center API to create a new document associated with a specific component. It is designed to add various types of documents such as design files, thumbnails, reference materials, gallery images, or type catalogs to components managed within the iTwin ecosystem.
Common scenarios include:
- Uploading a new design document version for a component.
- Adding a thumbnail image linked to a design document.
- Associating reference or gallery images to enrich component metadata.
- Creating a type catalog document that complements an existing design document.
Practical example: A user wants to upload a new version of a design file (.rfa) for a building component, specifying its version and linking it to the previous version to maintain version history.
Properties
| Name | Meaning |
|---|---|
| Component ID | The unique identifier of the component to which the document will be attached. |
| Display Name | The display name of the document (max 250 characters). Must not contain special characters >, <, ^, $, ?, ` |
| Extension | File extension of the document, e.g., rfa, dgn, txt. |
| Version | Version string of the document. |
| Previous Version ID | For documents with purpose 'Design', this should hold the ID of the previous active design document when creating a new version. |
| Associated Design Document | For documents with purpose 'Thumbnail' or 'TypeCatalog', this refers to the associated design document's ID. |
| Purpose | The role of the document. Options are: Design, Thumbnail, Reference, Gallery Image, Type Catalog. Only one TypeCatalog document can exist per component with an existing design document. Display names of type catalog and design must match. |
| Available | Boolean indicating if a file is physically associated with the document. |
| Is Active | Boolean indicating if the document is active. Defaults to true except for 'Design' or 'Thumbnail' documents where only one version can be active at a time. |
| Options → Custom Payload | Allows overriding the request body with a custom JSON payload instead of using the standard properties. |
Output
The node outputs an array of JSON objects representing the created document(s) returned by the iTwin Component Center API. Each output item contains the full response data from the API about the newly created document, including identifiers, metadata, and status.
No binary data output is indicated.
Dependencies
- Requires an API authentication token credential for the iTwin OAuth2 service.
- The node depends on the iTwin Component Center API being accessible.
- Proper configuration of the OAuth2 credentials in n8n is necessary for successful API calls.
Troubleshooting
- Error: Unknown operation — This occurs if the specified operation is not recognized by the node. Ensure the operation parameter is set exactly to "create-component-document" for this use case.
- Validation errors on Display Name — If the display name includes forbidden special characters or exceeds length limits, the API may reject the request. Validate input accordingly.
- Versioning conflicts — When setting
Previous Version IDfor design documents, ensure the referenced document exists and is active; otherwise, the API might return an error. - Authentication failures — Verify that the OAuth2 credentials are correctly configured and have sufficient permissions.
- Custom Payload issues — If using the custom JSON payload option, ensure the JSON is valid and matches the API schema; malformed JSON will cause request failures.
Links and References
- iTwin Developer Documentation
- Refer to the iTwin Component Center API docs for detailed schema and usage guidelines.