Overview
This node integrates with SipPulse AI to send messages to AI agents and manage conversational threads persistently. It is designed to maintain session continuity by mapping session IDs to thread IDs stored in a local file, enabling ongoing conversations with the same agent context.
Common scenarios include:
- Chatbot workflows where users interact with AI agents over multiple messages.
- Automating customer support or virtual assistant tasks that require session persistence.
- Any use case needing stateful interaction with an AI agent across multiple executions.
For example, you can send a user message to a specific AI agent, keep track of the conversation thread using a session ID, and retrieve the AI's response while preserving context between calls.
Properties
| Name | Meaning |
|---|---|
| Agent ID | The identifier of the AI agent to send the message to. Options are dynamically loaded from available agents. |
| Message | The text content to send as a message to the selected AI agent. |
| Session ID | A unique identifier representing the conversation session, used to maintain thread continuity. Typically obtained from a previous chat node. |
| Storage Path | File system path to a JSON file used to store and persist the mapping between session IDs and thread IDs for conversation tracking. |
Output
The node outputs JSON data containing:
response: The AI agent's reply message text.session_id: The session ID used for the conversation.thread_id: The internal thread ID corresponding to the conversation thread on the SipPulse AI service.
This output allows downstream nodes to access the AI's response and maintain session context.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the SipPulse AI service.
- Uses the SipPulse AI REST API endpoints to list agents, create threads, check thread existence, and send messages.
- Reads and writes a local JSON file (specified by "Storage Path") to persist session-to-thread mappings.
- Requires filesystem access permissions for reading/writing the storage file.
Troubleshooting
- Error saving thread mapping: Indicates issues writing to the specified storage file path. Ensure the path is correct and writable by n8n.
- Failed to get thread_id from API response: Occurs if the API does not return a valid thread ID when creating a new thread. Check API credentials and network connectivity.
- Error loading agents: Happens if fetching the list of agents fails, possibly due to invalid API key or network issues.
- If the node throws errors related to missing or invalid session/thread IDs, verify that the session ID input is correctly provided and consistent across executions.
- To avoid losing conversation context, ensure the storage file is not deleted or corrupted between runs.
Links and References
- SipPulse AI API Documentation (hypothetical link based on usage)
- n8n documentation on Creating Custom Nodes
- Node.js
fsmodule documentation for file operations: https://nodejs.org/api/fs.html