OpenAI Analytics icon

OpenAI Analytics

Use OpenAI Analytics API

Thread → Add Message

AI-generated

Overview

The "Add Message" operation for the "Thread" resource in this OpenAI Analytics node allows users to add a new message to an existing conversation thread. This is useful in scenarios where you want to programmatically continue or update a conversation by appending user messages, potentially with attached files.

Typical use cases include:

  • Adding user input messages to an ongoing AI assistant conversation.
  • Appending contextual information or follow-up questions to a thread.
  • Attaching relevant files to messages within a conversation for richer context.

For example, after creating a thread representing a chat session, you can use this operation to add a user’s next message along with any supporting documents referenced by file IDs.

Properties

Name Meaning
Authentication Choose between using dedicated OpenAI Analytics API credentials or existing OpenAI API credentials. Options: "OpenAI Analytics API", "OpenAI API".
Thread ID The unique identifier of the thread to which the message will be added. (Required)
Message Role The role of the message author. Currently only supports "User" (a message created by the user). (Required)
Message Content The textual content of the message to add to the thread. (Required)
File IDs Optional comma-separated list of file IDs to attach to the message, providing additional context or data.

Output

The output JSON structure contains the result of adding the message to the specified thread. It typically includes details about the updated thread state or confirmation of the message addition.

If the node supports binary data output (not explicitly shown for this operation), it would represent file attachments or related binary content associated with the thread message.

Dependencies

  • Requires valid API authentication credentials for OpenAI services, either via dedicated OpenAI Analytics API credentials or standard OpenAI API credentials.
  • The node internally uses the OpenAI client library to interact with the OpenAI Analytics API endpoints.
  • Proper configuration of these credentials in n8n is necessary before using this operation.

Troubleshooting

  • Invalid Thread ID: If the provided thread ID does not exist or is malformed, the operation will fail. Ensure the thread ID is correct and that the thread exists.
  • Authentication Errors: Using incorrect or expired API keys will cause authentication failures. Verify that the API key credentials are valid and have appropriate permissions.
  • File Attachment Issues: Providing invalid or inaccessible file IDs may cause errors when attaching files. Confirm that file IDs are correct and accessible under your account.
  • Missing Required Fields: Omitting required properties like Thread ID or Message Content will result in validation errors. Always provide all required inputs.
  • API Rate Limits: Exceeding OpenAI API rate limits may cause temporary failures. Implement retry logic or reduce request frequency if needed.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions without runtime execution.

Discussion