Send Message
AI-generatedOverview
This node operation sends a message to a specified Lerty AI agent. It supports starting a new conversation or continuing an existing one by specifying a conversation ID. Users can include text messages, file attachments, and additional metadata with the message. This operation is useful for automating communication with AI agents, such as sending user queries or commands and optionally attaching files for context.
Use Case Examples
- Sending a greeting message to an AI agent to initiate a conversation.
- Sending a follow-up message in an existing conversation with an AI agent.
- Attaching a PDF document to a message sent to an AI agent for processing.
Properties
| Name | Meaning |
|---|---|
| Agent | The Lerty AI agent to which the message will be sent. Can be selected from a list or specified by ID. |
| Message | The text content of the message to send to the agent. |
| Conversation ID | The ID of the conversation to send the message to. Leave empty to start a new conversation. |
| User ID | The ID of the user sending the message, used for identification in the conversation. |
| File Attachment | Optional file to attach to the message, including URL, file name, and MIME type. |
| Additional Fields | Optional additional parameters such as metadata key-value pairs and request timeout in milliseconds. |
Output
JSON
id- Unique identifier of the sent message.content- Text content of the sent message.conversationId- ID of the conversation the message belongs to.userId- ID of the user who sent the message.type- Type of the message, e.g., 'user_message'.timestamp- Timestamp when the message was sent.fileUrl- URL of the attached file, if any.fileName- Name of the attached file, if any.fileType- MIME type of the attached file, if any.metadata- Metadata key-value pairs attached to the message, if any.
Dependencies
- Lerty API with API token credential
Troubleshooting
- Ensure the Agent ID is valid and matches the required format (letters, numbers, hyphens, underscores).
- If attaching a file, verify the file URL is accessible and correct.
- If the conversation ID is left empty, a new conversation will be started automatically.
- Check API credentials and network connectivity if the message sending fails.
- Timeouts can be adjusted via the 'Timeout' additional field to handle slow network responses.