OpenProject icon

OpenProject

Interact with OpenProject via API

Actions199

Overview

This node operation updates the week days configuration of a Work Schedule in an external system via its API. It allows users to specify which days are working days and which are not by sending a structured collection of week day objects. This is useful for automating schedule management, such as setting business hours or defining non-working days programmatically.

Practical examples include:

  • Automatically updating a project’s work schedule based on company holidays.
  • Adjusting team availability dynamically in response to changes in working days.
  • Integrating with HR systems to reflect employee-specific work weeks.

Properties

Name Meaning
Type Must be set to "Collection" to indicate the data structure type being sent.
Embedded A JSON object representing the week days to update. Contains an array elements where each element defines a weekday with properties like _type (always "WeekDay") and working (boolean indicating if it is a working day).

Example of the Embedded property value:

{
  "elements": [
    {
      "_type": "WeekDay",
      "working": false
    }
  ]
}

Output

The node outputs JSON data reflecting the response from the API after updating the week days. The exact structure depends on the external service's API response but typically includes confirmation of the updated schedule or error details if the update failed.

No binary data output is involved.

Dependencies

  • Requires an API key credential for authenticating requests to the external system managing the Work Schedule.
  • The base URL for the API must be configured in the node credentials.
  • The node uses JSON payloads to communicate with the API.

Troubleshooting

  • Invalid JSON in Embedded Property: If the JSON provided in the Embedded field is malformed, the node will fail to parse it. Ensure valid JSON syntax.
  • API Authentication Errors: Missing or incorrect API credentials will cause authentication failures. Verify that the API key/token and base URL are correctly set.
  • Incorrect Property Values: The Type property must be "Collection". Using other values may result in request errors.
  • API Response Errors: If the API rejects the update due to invalid data (e.g., invalid weekdays or missing required fields), check the API documentation for correct payload structure.

Links and References

  • Refer to the external system’s API documentation for detailed information on the Work Schedule resource and the expected format for updating week days.
  • JSON formatting guides to help construct the Embedded property correctly.

Discussion