Actions26
- Repositories Actions
- Resource Actions
- Resources Actions
- Favorites Actions
- Exports Actions
- Image Actions
- Account Actions
- Graphics Actions
- Recents Actions
Overview
This node operation "Create iTwin" allows users to create a new iTwin entity within the Bentley iTwin platform. An iTwin represents a digital twin instance, which can be an Account, Thing, Endeavor, or other subclasses like Portfolio, Asset, Program, Project, or Work Package. This node is useful for automating the creation and organization of digital twins in workflows, such as setting up new projects, assets, or portfolios programmatically.
Practical examples include:
- Automatically creating a new Project iTwin when a project is initiated in another system.
- Creating Asset iTwins based on inventory data imported from external sources.
- Organizing iTwins hierarchically by specifying parent-child relationships (e.g., Projects under Assets).
Properties
| Name | Meaning |
|---|---|
| Class | The main class of the iTwin to create. Options: Account, Thing, Endeavor. |
| Sub Class | The subclass of the iTwin. Options: Account, Portfolio, Asset, Program, Project, Work Package. |
| Type | A free-text field to further define the iTwin's type. |
| Display Name | The display name for the iTwin. |
| Number | A unique identifier or code for the iTwin within your organization. Defaults to the auto-generated iTwin Id if not specified. |
| Geographic Location | Optional location description, typically an address or city. |
| Latitude | Optional latitude coordinate of the iTwin. |
| Longitude | Optional longitude coordinate of the iTwin. |
| Iana Time Zone | Optional time zone of the iTwin, must be a valid IANA time zone ID (e.g., "America/New_York"). |
| Data Center Location | Specifies the data center where the iTwin data will be stored. Default is East US. Valid values include East US, North Europe, West Europe, Southeast Asia, Australia East, UK South, Canada Central, Central India, Japan East. |
| Status | Status of the iTwin. Options: Active, Inactive, Trial. |
| Parent ID | Optional Id of the parent iTwin to establish hierarchy. If omitted, defaults to the user's Account iTwin. |
| Options | Collection of additional options. Currently supports a "Custom Payload" option to override the request body with a custom JSON payload instead of using the standard properties. |
Output
The output of this node is a JSON object representing the newly created iTwin. It contains all relevant details returned by the API after creation, such as the iTwin's Id, class, subclass, display name, status, location, and any other metadata provided or generated.
If the "Custom Payload" option is used, the output corresponds to the response of that custom request.
No binary data output is indicated.
Dependencies
- Requires an API key credential or OAuth2 token configured in n8n to authenticate with the Bentley iTwin API.
- The node depends on the Bentley iTwin REST API endpoint for creating iTwins.
- Proper network access to the Bentley iTwin service is required.
- The user must have appropriate permissions to create iTwins in their account or organization.
Troubleshooting
- Missing Required Fields: Errors may occur if mandatory fields like Class, Sub Class, or Display Name are missing. Ensure these are provided.
- Invalid Option Values: Providing invalid values for enumerated fields (e.g., Status, Data Center Location) will cause API errors. Use only supported options.
- Authentication Failures: If the API key or OAuth token is invalid or expired, authentication errors will occur. Refresh or reconfigure credentials.
- Parent ID Issues: Specifying a non-existent or unauthorized Parent ID will result in errors. Verify the parent iTwin exists and you have access.
- Custom Payload Errors: When using the Custom Payload option, malformed JSON or incorrect API request structure can cause failures. Validate JSON syntax and API requirements.
- API Rate Limits or Network Issues: Temporary failures might happen due to rate limiting or connectivity problems. Retry or check network status.