Actions8
- Session Actions
- Message Actions
Session → Send Message
AI-generatedOverview
This node interacts with the OpenAI ChatKit API to manage chat sessions and send messages to Agent Builder workflows. It supports creating, refreshing, and ending chat sessions, as well as sending messages within those sessions. This node is useful for automating conversations with AI workflows, enabling integration of chat capabilities into automation processes. For example, it can be used to create a session for a specific workflow, send user messages to that workflow, and handle session lifecycle management.
Use Case Examples
- Create a new chat session for a workflow to start a conversation.
- Send a message to an existing chat session to continue the dialogue.
- Refresh a session's client secret to maintain an active connection.
- End a session locally to clear stored session data.
Properties
| Name | Meaning |
|---|---|
| Session Source | Choose whether to reuse the stored session or supply credentials explicitly when sending a message. |
| Session ID | The identifier of the chat session, required if providing manual credentials. |
| Client Secret | The client secret associated with the chat session, required if providing manual credentials. |
| Workflow ID | The ID of the Agent Builder workflow to target with the message or session creation. |
| Thread ID | Optional thread identifier to continue an existing conversation thread. |
| Role | Role attached to the outgoing message, such as user, assistant, or system. |
| Message Text | The content of the message to send to the workflow. |
| System Prompt | Optional system-level instructions appended to the message. |
| Message Metadata (JSON) | Optional metadata forwarded with the message in JSON format. |
| Timeout (ms) | Maximum time to wait for the ChatKit API response in milliseconds. |
Output
JSON
workflowId- The ID of the workflow associated with the session or message.sessionid- The chat session identifier.client_secret- The client secret for the chat session, partially masked for security.expires_at- The expiration timestamp of the session, if available.
raw- The raw response data from the ChatKit API, useful for debugging or extended processing.
Dependencies
- Requires OpenAI ChatKit API credentials including an API key, and optionally organization and project IDs.
Troubleshooting
- Error indicating missing or invalid workflow ID when creating a session or sending a message. Ensure the workflow ID is provided and correctly formatted.
- Errors related to missing session credentials when sending a message with manual session source. Provide both session ID and client secret.
- Timeout errors if the ChatKit API does not respond within the specified timeout period. Increase the timeout or check network connectivity.
- Errors from the ChatKit API such as 404 indicating invalid endpoints or session IDs. Verify the session ID and API base URL configuration.
Links
- OpenAI ChatKit Documentation - Official documentation for the OpenAI ChatKit API used by this node.