Overview
This node integrates with Lerty AI agents to facilitate communication within conversations. Specifically, the "Reply to Conversation" operation allows users to send a reply message to an existing conversation identified by its ID. This is useful in scenarios where automated or semi-automated responses are needed in ongoing chat sessions managed by Lerty agents.
Practical examples include:
- Automatically responding to customer inquiries in a support chat.
- Sending follow-up messages in a conversational workflow.
- Integrating AI-generated replies into live conversations.
The node handles sending the reply either via a webhook URL provided in the input data or directly through the Lerty API if no webhook is available.
Properties
| Name | Meaning |
|---|---|
| Agent | The Lerty AI agent to interact with. Can be selected from a list of agents or specified by ID. |
| Conversation ID | The unique identifier of the conversation to which the reply will be sent. |
| Message | The text content of the reply message to send. |
| Additional Fields | Optional extra parameters: |
| - Metadata | Key-value pairs to attach custom metadata to the message. |
| - Timeout | Request timeout in milliseconds (default 30000 ms). |
Output
The output JSON contains the response from the Lerty API or webhook after sending the reply message. It typically includes confirmation details about the sent message or any error information if the request failed.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the Lerty API.
- The node uses HTTP requests to communicate with the Lerty service endpoints.
- If replying via webhook, the webhook URL must be present in the incoming data or accessible via the workflow context.
Troubleshooting
- Missing or empty Conversation ID: The node throws an error if the conversation ID is not provided or is empty. Ensure the conversation ID is correctly set and does not contain unevaluated expressions.
- Webhook URL not found: If the node cannot find a
response_webhookURL in the input data or workflow context, it falls back to using the agent's webhook endpoint. Verify that the webhook URL is correctly passed in the trigger data or input. - Validation errors (HTTP 422): These occur if the message payload fails server-side validation. The error message includes details about the invalid fields. Check the conversation ID and message content for correctness.
- API connectivity issues: Errors during API calls may indicate incorrect credentials or network problems. Confirm the API key and base URL configuration.
- Expression errors in Conversation ID: If the conversation ID contains unevaluated expressions (e.g.,
{{...}}), the node will throw an error. Make sure all expressions are properly resolved before execution.
Links and References
- Lerty API Documentation (hypothetical link)
- n8n Documentation on Creating Custom Nodes
- HTTP Request Node Reference in n8n for understanding underlying HTTP calls