Actions27
- Comments Actions
- List Groups Actions
- Static Images Actions
- Issues Actions
- Workflows Actions
- Attachments Actions
- Form Definitions Actions
- Import Actions
Overview
This node integrates with the iTwin Issues API to add an attachment to a specific issue within an iTwin project. It is useful for automating the process of uploading files such as images, documents, or other relevant attachments directly to issues tracked in the iTwin platform. Typical use cases include attaching photos of construction defects, design documents, or any supporting files that help clarify or resolve an issue.
For example, a user could automate adding daily progress photos to an issue or attach inspection reports generated by another system.
Properties
| Name | Meaning |
|---|---|
| ID | The unique identifier of the issue to which the attachment will be added. |
| File Name | The filename of the attachment. This determines the MIME type when the file is requested later. |
| Caption | A descriptive string explaining the significance or context of the attachment. |
| Binding | Associates the attachment with an Image Drop control if the attachment originates from such a control. |
| Options | Additional options including: |
| Custom Payload | Allows overriding the request body with a custom JSON payload instead of the standard format. |
Output
The node outputs JSON data representing the response from the iTwin Issues API after adding the attachment. This typically includes metadata about the newly created attachment such as its ID, URL, and any server-generated information confirming the upload.
If binary data were involved (e.g., the actual file content), it would be handled accordingly, but based on the provided code and properties, the node primarily deals with JSON responses describing the attachment.
Dependencies
- Requires an API key credential configured for OAuth2 authentication with the iTwin platform.
- Depends on the iTwin Issues API endpoint at
https://api.bentley.com. - Uses internal shared utilities for making authenticated API requests.
- Requires proper configuration of the iTwin project ID (
iTwinId) and issue ID.
Troubleshooting
Common issues:
- Invalid or missing issue ID: The node requires a valid issue ID to attach the file. Ensure the ID corresponds to an existing issue.
- Authentication errors: Make sure the OAuth2 credentials are correctly set up and have sufficient permissions.
- Incorrect file name or MIME type: The file name influences the MIME type; incorrect extensions may cause upload failures or misinterpretation.
- Network or API endpoint errors: Verify network connectivity and that the API endpoint is reachable.
Error messages:
"Unsupported operation": Indicates the selected operation is not implemented or recognized by the node.- API errors returned from the iTwin platform will be surfaced; check the error message for details such as permission denied or invalid parameters.
Resolution tips:
- Double-check all required parameters are provided and correctly formatted.
- Validate OAuth2 credentials and refresh tokens if expired.
- Review API documentation for any changes in endpoint or payload requirements.
Links and References
- iTwin Developer Documentation
- iTwin Issues API Reference (general link, consult for detailed API usage)