Workspace icon

Workspace

Get and change data from Workspace API

Overview

The node interacts with a Workspace API to manage and update various resources, including users. Specifically, the "Update User Role" operation allows changing the role assigned to a user by specifying the user's unique identifier and the new role's unique identifier. This is useful in scenarios where user permissions or access levels need to be modified dynamically within an organization or project management system.

Practical examples include:

  • Promoting a user from a basic member to an administrator.
  • Changing a user's role when they move to a different team or project phase.
  • Revoking or granting specific access rights by assigning appropriate roles.

Properties

Name Meaning
User ID Unique identifier of the user whose role is to be updated.
Role ID Unique identifier of the role to assign to the specified user.

Output

The node outputs JSON data representing the result of the role update operation for the specified user. This typically includes confirmation of the update, possibly the updated user object with the new role information, or status messages indicating success or failure.

If the node supports binary data output (not indicated here), it would represent any associated files or attachments related to the user or role update, but this is not applicable based on the provided code and properties.

Dependencies

  • Requires connection to the Workspace API via an API key credential and tenant identification.
  • The node expects these credentials to be configured in n8n under a generic API authentication token and tenant environment variables.
  • The base URL for the API must be set correctly in the node credentials to ensure successful communication.

Troubleshooting

  • Common Issues:

    • Invalid or missing User ID or Role ID can cause the update to fail.
    • Incorrect API credentials or tenant information will prevent successful API calls.
    • Network connectivity issues may lead to timeouts or unreachable API endpoints.
  • Error Messages:

    • Errors indicating unauthorized access usually mean the API key or tenant info is incorrect or lacks sufficient permissions.
    • Not found errors suggest that either the User ID or Role ID does not exist in the system.
    • Validation errors may occur if the input parameters are malformed or missing.
  • Resolutions:

    • Verify that the User ID and Role ID are correct and exist in the Workspace system.
    • Check and update API credentials and tenant details in n8n settings.
    • Ensure network connectivity and that the API endpoint URL is reachable.

Links and References

  • Refer to the Workspace API documentation for detailed information on user and role management endpoints.
  • Consult n8n documentation on setting up API credentials and handling HTTP request nodes for custom integrations.

Discussion