Actions20
- Assistant Actions
- Embedding Actions
- File Actions
- Report Actions
- Text Actions
- Thread Actions
Overview
The "Get Assistants" operation of the OpenAI Analytics node retrieves a list of assistants available in the connected OpenAI Analytics or OpenAI API account. This node is useful when you want to dynamically fetch and select from existing assistants for further operations such as running conversations, managing threads, or integrating assistant capabilities into workflows.
Common scenarios:
- Listing all assistants to allow users to pick one for interaction.
- Automating workflows that depend on specific assistants by fetching their IDs programmatically.
- Managing multiple assistants across different projects or organizations.
Practical example:
You might use this node to populate a dropdown menu in an n8n workflow where the user selects which assistant to run a conversation with. The node fetches all assistants, showing their names and IDs, enabling seamless integration with other nodes that require an assistant ID.
Properties
Name | Meaning |
---|---|
Authentication | Choose between using dedicated OpenAI Analytics API credentials or existing OpenAI API credentials. Options: "OpenAI Analytics API", "OpenAI API". |
Output
The output is a JSON array where each item represents an assistant with the following structure:
[
{
"name": "Assistant Name or 'Assistant (ID)'",
"value": "assistant_id"
},
...
]
- name: The display name of the assistant. If the assistant has no name, it defaults to
"Assistant (ID)"
. - value: The unique identifier of the assistant.
If no assistants are found, the output will contain a single entry indicating "No assistants found".
In case of errors during credential loading or API calls, the output will contain an error message object instead.
Dependencies
Requires valid API credentials for either:
- A dedicated OpenAI Analytics API key credential, or
- An existing OpenAI API key credential.
The node uses the official OpenAI SDK to communicate with the OpenAI API endpoints.
Network access to the OpenAI API endpoint (
https://api.openai.com/v1
by default) is required.Proper configuration of credentials in n8n is necessary before using this node.
Troubleshooting
Common issues
Credential loading failure: If the node cannot load the provided API credentials, it logs an error and returns an error message in the output. Ensure that the API keys are correctly configured and have the necessary permissions.
API request failure: Errors while fetching assistants (e.g., network issues, invalid API keys, or permission problems) will be logged and returned as error messages. Verify API key validity and network connectivity.
No assistants found: If the account has no assistants, the node returns a message indicating this. Confirm that assistants exist in your OpenAI Analytics account.
Error messages and resolutions
"Error loading credentials"
: Check that the API key credential is set up correctly in n8n and that the key is valid."Error loading assistants"
: Indicates a problem with the API call. Check API key permissions, network access, and whether the OpenAI service is operational."No assistants found"
: No assistants exist in the account. Create assistants first or verify the correct account is connected.
Links and References
- OpenAI API Documentation
- OpenAI Analytics API Overview
- n8n Documentation on Credentials
- OpenAI Node SDK GitHub Repository
Note: This summary is based solely on static analysis of the provided source code and property definitions.