OpenProject icon

OpenProject

Interact with OpenProject via API

Actions199

Overview

The "Update Membership" operation in the Memberships resource allows users to modify an existing membership record in OpenProject via its API. This node is useful when you need to update membership details such as linked roles, projects, or notification settings programmatically within an n8n workflow.

Typical use cases include:

  • Changing the roles assigned to a member in a project.
  • Updating project links or principal references associated with a membership.
  • Sending notifications about membership updates with customized messages.

For example, you might automate updating team member roles after a project phase change or notify stakeholders when membership details are modified.

Properties

Name Meaning
Id The unique identifier of the membership to update (number).
Links JSON object defining related resources and actions, including principal, roles, and project links. It must be valid JSON and typically includes HTTP method and href for API calls. Example structure: {"principal": {"href": "/api/v3/work_packages", "method": "POST"}, "roles": [{}], "project": {}}.
Meta JSON object containing metadata for the update request, such as notification message format and content, and whether to send a notification. Example: {"notificationMessage": {"format": "markdown", "raw": "I am formatted!", "html": "I am formatted!"}, "sendNotification": true}.

Output

The node outputs the JSON response from the OpenProject API after attempting to update the membership. This JSON typically contains the updated membership details reflecting the changes made.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to an OpenProject instance via its REST API.
  • Needs an API authentication token or key configured in n8n credentials to authorize requests.
  • The base URL of the OpenProject server must be set in the node's credentials.
  • The node uses JSON-formatted input for complex properties (_links and _meta) which must be correctly structured.

Troubleshooting

  • Invalid JSON in Links or Meta: If the JSON provided in the Links or Meta fields is malformed, the node will fail. Ensure that these inputs are valid JSON strings.
  • Membership ID Not Found: Providing an incorrect or non-existent membership ID will result in an error from the API indicating the resource was not found.
  • Authentication Errors: Missing or invalid API credentials will cause authorization failures. Verify that the API key/token and base URL are correctly configured.
  • API Endpoint Changes: If the OpenProject API version changes or endpoints are deprecated, the node may stop working until updated accordingly.
  • Notification Failures: If sending notifications is enabled but the message format or content is invalid, the API might reject the request.

Links and References

Discussion