Actions12
Overview
The node integrates with the Coze AI platform, specifically allowing users to interact with various resources such as workspaces, chats, workflows, files, and audio. For the Workspace resource with the List Bots operation, it retrieves a list of bots associated with a specified workspace. This is useful for scenarios where you want to programmatically access or manage bots within a workspace, filter them by their publish status, or paginate through large sets of bots.
Practical examples include:
- Automating the retrieval of all published bots in a workspace to display or process them further.
- Filtering bots by their publish status (e.g., only published drafts) to perform batch updates or audits.
- Paginating through bots when there are many, to avoid overwhelming API calls or UI elements.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authentication to use: "Service Token" or "OAuth2". |
| Workspace Name or ID | The identifier of the workspace from which to list bots. Can be selected from a list or provided via expression. |
| Publish Status | Filter bots by their publish status. Options: "All", "Published Online", "Published Draft", "Unpublished Draft". |
| Connector ID | Channel ID required only if filtering by "Published Online" or "Published Draft". Defaults to "1024" (API channel). |
| Page Number | The page number for paginated results. Minimum value is 1. |
| Page Size | Number of bots per page for pagination. Range: 1 to 100. |
Output
The output is a JSON array containing bot objects retrieved from the Coze AI platform. Each object represents a bot with its properties as returned by the API. The exact structure depends on the API response but typically includes identifiers, names, statuses, and other metadata about each bot.
No binary data output is indicated for this operation.
Dependencies
- Requires an API key credential or OAuth2 token configured in n8n for authenticating requests to the Coze AI platform.
- The node makes HTTP requests to
https://api.coze.cnendpoints. - Pagination and filtering depend on correct workspace IDs and optional connector/channel IDs.
Troubleshooting
Common issues:
- Invalid or missing workspace ID: Ensure the workspace ID is correctly selected or provided.
- Authentication errors: Verify that the API key or OAuth2 credentials are valid and have necessary permissions.
- Incorrect publish status or connector ID combination: Connector ID must be provided when filtering by "Published Online" or "Published Draft".
- Pagination parameters out of range: Page number must be ≥1; page size must be between 1 and 100.
Error messages:
- API errors will typically return error messages from the Coze platform. Check the message for details like invalid credentials or resource not found.
- If the node throws an error about missing parameters, verify that all required fields are filled.
- Network or timeout errors may occur if the Coze API is unreachable; check network connectivity.
Links and References
- Coze AI Platform API Documentation (assumed base URL)
- n8n Expressions Documentation – for using expressions in input fields such as workspace ID.