OpenProject icon

OpenProject

Interact with OpenProject via API

Actions199

Overview

This node operation, Form Create Membership under the Memberships resource, allows users to create a membership entry in OpenProject by submitting a structured JSON form. It is useful when you want to programmatically assign roles or link users (principals) to projects or work packages within OpenProject.

Typical use cases include:

  • Automating project team assignments.
  • Creating memberships with specific roles for users on projects or work packages.
  • Integrating membership creation into larger workflows that manage project resources and permissions.

For example, you might use this node to add a user as a member of a project with a defined role, triggering notifications about their new membership.

Properties

Name Meaning
_links JSON object defining links related to the membership creation. Includes:
- principal: The user or entity to be linked, with an API endpoint (href) and HTTP method.
- roles: An array specifying roles assigned to the principal.
- project: The project or work package context for the membership.
_meta JSON object containing metadata for the request. Includes:
- notificationMessage: A message formatted in markdown, raw text, and HTML to notify about the membership creation.
- sendNotification: Boolean flag indicating whether to send a notification upon membership creation.

Output

The node outputs JSON data representing the response from the OpenProject API after attempting to create the membership. This typically includes details of the newly created membership such as identifiers, linked principal, roles, and project information.

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 credential configuration.

Troubleshooting

  • Invalid JSON in _links or _meta properties: Since these fields expect valid JSON, malformed input will cause errors. Ensure JSON syntax is correct before running the node.
  • Authorization errors: If the API key or token is missing or invalid, the node will fail to authenticate. Verify credentials are correctly set up.
  • API endpoint errors: Incorrect URLs or HTTP methods in the _links property can lead to failed requests. Confirm the href and method values match OpenProject API specifications.
  • Notification failures: If sendNotification is true but notification settings are misconfigured in OpenProject, notifications may not be sent even though the membership is created.

Links and References

Discussion