iTwin Forms icon

iTwin Forms

Comprehensive iTwin Forms API

Overview

This node integrates with the iTwin Forms API, allowing users to interact with form data within the iTwin platform. Specifically, the "Get form data attachments" operation retrieves all attachments associated with a particular form data instance by its ID. This is useful when you need to access files or documents submitted as part of a form response.

Practical examples include:

  • Downloading images or documents uploaded through a form for further processing.
  • Archiving or backing up attachments related to specific form submissions.
  • Integrating form attachments into other workflows such as document management or notification systems.

Properties

Name Meaning
ID The unique identifier of the form data instance whose attachments you want to retrieve. This is required to specify which form submission's attachments to fetch.

Output

The output is an array of JSON objects representing the attachments retrieved from the specified form data instance. Each item in the output corresponds to one attachment and contains metadata and possibly the content or reference to the attachment.

If the node supports binary data (not explicitly shown in the code), it would typically represent the actual file contents of the attachments, enabling downstream nodes to process or save these files.

Dependencies

  • Requires an API key credential for authentication with the iTwin platform (referred to generically as an OAuth2 API credential).
  • Depends on the FormsOpenApiInterpreter class/module to interpret and execute API operations.
  • The node expects the iTwin Forms API to be accessible and properly configured.

Troubleshooting

  • Unknown operation error: If the operation parameter is incorrect or unsupported, the node throws an error indicating an unknown operation. Ensure the operation name matches exactly "get-form-data-attachments".
  • Missing or invalid ID: Since the ID property is required, omitting it or providing an invalid ID will likely cause the API call to fail. Verify that the ID corresponds to an existing form data instance.
  • API authentication errors: Failure to provide valid credentials or expired tokens will result in authentication errors. Check that the API key or OAuth2 token is correctly configured and has necessary permissions.
  • Network or API downtime: Connectivity issues or iTwin API service interruptions can cause execution failures. Retry after some time or check network settings.

When continueOnFail is enabled, errors are caught and returned as JSON with an error message instead of stopping the workflow.

Links and References

Discussion