Actions12
Overview
This node integrates with the Coze AI platform, specifically enabling interaction with chat conversations. The "提交工具执行结果" (Submit Tool Outputs) operation allows users to send the results of external tool executions back into an ongoing chat session within a specified conversation and chat context.
Typical use cases include:
- Submitting outputs from automated tools or services that assist in a chat workflow.
- Feeding processed data or analysis results into a chat for further AI processing or user review.
- Integrating third-party tool results seamlessly into conversational AI interactions.
For example, after running a sentiment analysis tool on a chat message, you can submit the tool's output back to the chat to influence subsequent AI responses or trigger specific workflows.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authenticating with the Coze API. Options: Service Token, OAuth2. |
| 会话 ID(conversationId) | Specifies the conversation instance where the chat occurs. Optional for this operation. |
| 对话 ID(chatId) | The unique identifier of the chat to which the tool outputs are submitted. Required. |
| 工具执行结果 (toolOutputs) | JSON string array representing the tool execution results. Format example: [{"tool_call_id": "...", "output": "..."}]. Required. |
| 流式响应 (stream) | Boolean flag to enable streaming response mode. Optional; defaults to false. |
Output
The node outputs a JSON array containing the response from the Coze API after submitting the tool outputs. The exact structure depends on the API response but generally includes confirmation of submission or any relevant metadata returned by the platform.
If streaming is enabled, the node may output partial or incremental data as it is received, useful for real-time processing scenarios.
No binary data output is indicated for this operation.
Dependencies
- Requires valid authentication credentials for the Coze AI platform, either via a service token or OAuth2.
- Network access to
https://api.coze.cnis necessary. - Proper configuration of credentials in n8n is required to authenticate API requests.
Troubleshooting
- Missing or invalid chatId: Since
chatIdis required, omitting it or providing an incorrect value will likely cause errors. Ensure the correct chat ID is provided. - Malformed toolOutputs JSON: The
toolOutputsproperty must be a valid JSON string representing an array of objects withtool_call_idandoutputfields. Invalid JSON or incorrect format will cause request failures. - Authentication errors: Using expired or incorrect credentials will result in authorization failures. Verify that the API key or OAuth2 token is valid and has appropriate permissions.
- Network issues: Connectivity problems to the Coze API endpoint will prevent successful submissions.
- Streaming issues: If enabling streaming (
streamset to true), ensure downstream nodes or consumers can handle streamed data properly.
Common error messages will typically relate to HTTP status codes such as 400 (bad request), 401 (unauthorized), or 404 (not found). Checking the input parameters and credentials usually resolves these.
Links and References
- Coze AI Platform Documentation (official API docs, if publicly available)
- n8n documentation on HTTP Request Node for understanding API integrations
- General JSON formatting guides to ensure proper
toolOutputsinput structure