OpenAI Analytics icon

OpenAI Analytics

Use OpenAI Analytics API

Overview

The "List Messages" operation of the "Thread" resource in this OpenAI Analytics node retrieves messages from a specified conversation thread. This operation is useful when you want to fetch and review all messages exchanged within a particular thread, such as for auditing conversations, analyzing chat history, or integrating message data into workflows.

Practical examples include:

  • Extracting all messages from a customer support chat thread to analyze user interactions.
  • Fetching conversation history for display in a custom dashboard.
  • Using past thread messages as context for further AI processing or reporting.

Properties

Name Meaning
Authentication Choose which API credentials to use:
- OpenAI Analytics API
- OpenAI API
Thread ID The unique identifier of the thread from which to list messages (required)

Output

The output contains a JSON array of messages retrieved from the specified thread. Each message typically includes details such as the message content, role (e.g., user or system), timestamps, and any associated metadata. This structured data allows downstream nodes or processes to consume and manipulate the thread's message history.

If the node supports binary data output (not explicitly shown for this operation), it would represent file attachments or other non-JSON content related to the thread messages.

Dependencies

  • Requires valid API authentication credentials, either via dedicated OpenAI Analytics API credentials or existing OpenAI API credentials.
  • The node internally uses the official OpenAI client library to communicate with the OpenAI Analytics API endpoints.
  • Proper configuration of these credentials in n8n is necessary for successful API calls.

Troubleshooting

  • Common Issues:

    • Invalid or missing Thread ID: Ensure the Thread ID provided exists and is correctly formatted.
    • Authentication errors: Verify that the selected API credentials are valid and have appropriate permissions.
    • Network or API endpoint issues: Check connectivity and base URL settings if customized.
  • Error Messages:

    • "Unsupported resource: thread": Occurs if the resource parameter is incorrectly set; ensure "thread" is selected.
    • Credential loading errors: May indicate misconfigured or missing API keys; reconfigure credentials in n8n.
    • API response errors: Could be due to invalid Thread ID or insufficient permissions; verify inputs and credentials.

Resolving these usually involves verifying input parameters, checking credential validity, and ensuring network access to the OpenAI API.

Links and References

Discussion