OpenProject icon

OpenProject

Interact with OpenProject via API

Actions199

Overview

This node operation retrieves the default query for a specified project from OpenProject. It allows users to fetch work package data based on the project's saved default query, with options to override filters, sorting, grouping, pagination, and display settings.

Common scenarios include:

  • Automatically loading a project's default task or issue list in workflows.
  • Customizing the view of work packages by applying temporary filters or sorting without changing the saved query.
  • Paginating through large sets of work packages efficiently.
  • Enabling timeline or hierarchy views dynamically for better visualization.

Practical example:
A project manager wants to get all open tasks assigned to specific team members within a project, sorted by status ascending, grouped by status, and displayed with sums and timelines enabled. This node operation can be configured to fetch that data directly using the default query as a base but overriding filters and display options as needed.

Properties

Name Meaning
Id The numeric ID of the project for which the default query is requested.
Filters JSON string specifying filter conditions to override the query's persisted filters. Accepts any filters supported by the work packages endpoint. Use an empty array ([]) to apply no filters.
Offset Page number inside the queries' result collection of work packages, used for pagination.
Page Size Number of elements to display per page in the queries' result collection of work packages.
Sort By JSON string specifying sort criteria to override the query's persisted sort order. Example: [["status", "asc"]].
Group By The column name to group results by, overriding the query's persisted group criteria. Example: "status".
Show Sums Boolean indicating whether properties that support summing should be summed up in the results, overriding the query's persisted sums property.
Timestamps String specifying timestamps to filter by when showing changed attributes on work packages. Supports ISO8601 dates, durations, and relative date keywords like "oneDayAgo@HH:MM+HH:MM". Values older than 1 day require an Enterprise Token.
Timeline Visible Boolean indicating whether the timeline should be shown in the results.
Show Hierarchies Boolean indicating whether hierarchy mode should be enabled in the results.

Output

The node outputs JSON data representing the queried work packages according to the default query and any overrides applied via input properties. The structure typically includes:

  • Work package details such as IDs, statuses, assignees, and other fields defined by the query.
  • Pagination metadata reflecting offset and page size.
  • Grouping and sorting information if applied.
  • Optional timeline and hierarchy data depending on the flags set.

If binary data were involved (e.g., attachments), it would be indicated here, but this operation focuses on JSON work package data only.

Dependencies

  • Requires an API key credential for authenticating with the OpenProject API.
  • Needs the base URL of the OpenProject instance configured in credentials.
  • The user must have appropriate permissions to access the project's default query and work packages.
  • For filtering by timestamps older than one day, an Enterprise Token is required.

Troubleshooting

  • Invalid Project ID: If the provided project ID does not exist or is inaccessible, the node will fail. Verify the project ID and user permissions.
  • Malformed Filters or Sort JSON: Filters and sort criteria must be valid JSON strings. Errors parsing these will cause request failures. Validate JSON syntax before use.
  • Missing or Invalid Credentials: Ensure the API key and base URL are correctly configured in n8n credentials.
  • Enterprise Token Required: Using timestamp filters older than one day without an Enterprise Token will result in authorization errors.
  • Pagination Issues: Setting offset or page size incorrectly may lead to empty results or unexpected pages.

Links and References

Discussion