JoAi icon

JoAi

Send messages as a JoAi agent

Overview

This node allows sending messages through a conversational AI platform as either a user or an agent. Specifically, the "Send Message as Agent" operation sends a message from a specified agent to a particular chat room. This is useful in scenarios where automated agents need to proactively communicate with users or other agents within chat rooms, such as customer support bots delivering updates or notifications.

Practical examples include:

  • An AI support agent sending troubleshooting instructions directly into a customer support chat room.
  • Automated announcements or alerts posted by an agent into team collaboration channels.
  • Bots responding to user queries by posting messages as themselves in group conversations.

Properties

Name Meaning
Agent ID The unique identifier (UUID) of the agent that will send the message.
Message The content of the message to be sent by the agent.
Room The identifier of the chat room where the message will be posted.

Output

The node outputs JSON data representing the response from the API after sending the message. The structure typically contains a data field with details about the sent message or the result of the operation. If the data field is absent, the entire response object is returned.

No binary data output is produced by this node.

Example output JSON structure:

{
  "data": {
    // Details about the sent message or execution result
  }
}

Dependencies

  • Requires an API key credential for authenticating requests to the conversational AI platform.
  • The node makes HTTP POST requests to endpoints related to agents and their messaging capabilities.
  • Proper configuration of the API credential in n8n is necessary for successful operation.

Troubleshooting

  • Common issues:

    • Invalid or missing Agent ID or Room ID can cause the API request to fail.
    • Network connectivity problems may prevent the node from reaching the API endpoint.
    • Insufficient permissions or invalid API credentials will result in authentication errors.
  • Error messages:

    • Errors returned from the API are captured and included in the output JSON under an error field if the node is set to continue on failure.
    • Typical error messages might indicate invalid UUIDs, unauthorized access, or malformed requests.
  • Resolution tips:

    • Verify that the Agent ID and Room ID are correct and exist in the system.
    • Ensure the API key credential is valid and has the required permissions.
    • Check network connectivity and proxy settings if applicable.
    • Enable "Continue On Fail" in the node settings to handle errors gracefully during batch processing.

Links and References

Discussion