OpenProject icon

OpenProject

Interact with OpenProject via API

Actions199

Overview

This node interacts with the "Forms" resource of an API, specifically performing the "Show Or Validate Form" operation. It is designed to either display a form or validate its contents based on the input parameters provided. This can be useful in workflows where you need to dynamically retrieve form data for user interaction or verify form data before proceeding with further automation steps.

Practical examples include:

  • Displaying a form template to users for data entry.
  • Validating submitted form data to ensure it meets required criteria before processing.

Properties

Name Meaning
Type The type of the form to show or validate.
Lock Version A numeric version lock to handle concurrency or version control of the form.
Subject The subject or title associated with the form, possibly used for identification or display.

Output

The node outputs JSON data representing the form details or validation results. The exact structure depends on the API response but typically includes form fields, validation status, and any error messages if validation fails.

If the form includes binary data (e.g., attachments), the node would handle this accordingly, but no explicit binary output handling is indicated in the provided code.

Dependencies

  • Requires an API key credential for authentication to the external service hosting the Forms API.
  • The base URL for the API must be configured in the node credentials.
  • The node uses standard HTTP headers for JSON content negotiation (Accept: application/json and Content-Type: application/json).

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Providing an invalid form type or subject may result in errors or empty responses.
    • Version conflicts if the lockVersion does not match the current form version.
  • Error messages:

    • Authentication errors: Check that the API key or token is correctly set up in the credentials.
    • Validation errors: Review the form data being sent; ensure all required fields are included and correctly formatted.
    • Version mismatch errors: Update the lockVersion to the latest form version before submitting changes.

Links and References

  • Refer to the API documentation of the Forms service for detailed information on form types, validation rules, and versioning.
  • n8n documentation on how to configure API credentials and use HTTP request nodes for similar integrations.

Discussion