Coze icon

Coze

Interact with Coze AI platform

Overview

The node integrates with the Coze AI platform, enabling users to interact with various Coze resources such as workspaces, chats, workflows, files, and audio. Specifically, for the Workspace - List operation, it retrieves a list of workspaces associated with specified identifiers like enterprise ID, user ID, or Coze account ID.

This node is beneficial in scenarios where automation workflows need to dynamically fetch workspace information from Coze, for example:

  • Listing all workspaces under a particular enterprise to monitor or manage them.
  • Retrieving workspaces linked to a specific user or account for personalized processing.
  • Integrating workspace data into other systems or dashboards.

Properties

Name Meaning
Authentication Method used to authenticate API requests. Options: Service Token, OAuth2
Enterprise ID ID of the enterprise to list workspaces for
User ID ID of the user to list workspaces for
Coze Account ID ID of the Coze account to list workspaces for

Output

The output is a JSON array containing workspace objects retrieved from the Coze API. Each object typically includes details about a workspace such as its name and ID (based on typical API responses, though exact fields depend on Coze's API).

The node does not output binary data for this operation.

Example output structure (simplified):

[
  {
    "id": "workspace_id_1",
    "name": "Workspace One",
    ...
  },
  {
    "id": "workspace_id_2",
    "name": "Workspace Two",
    ...
  }
]

Dependencies

  • Requires an active connection to the Coze AI platform API.
  • Needs either a service token or OAuth2 credentials configured in n8n for authentication.
  • The base URL for API requests is https://api.coze.cn.

Troubleshooting

  • Common issues:

    • Invalid or expired authentication credentials will cause request failures.
    • Providing incorrect or empty IDs (enterprise, user, or account) may result in empty lists or errors.
    • Network connectivity problems can prevent successful API calls.
  • Error messages:

    • Errors returned by the Coze API are propagated; typical messages might include authentication failures or resource not found.
    • If the node throws an error related to missing parameters, ensure that at least one of the ID fields is correctly set when listing workspaces.
  • Resolution tips:

    • Verify that the authentication method selected matches the configured credentials.
    • Double-check the IDs provided for correctness.
    • Enable "Continue On Fail" in the node settings if you want the workflow to proceed despite individual errors.

Links and References

Discussion