Actions20
- Assistant Actions
- Embedding Actions
- File Actions
- Report Actions
- Text Actions
- Thread Actions
Assistant → Get Assistants
AI-generatedOverview
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 threads, adding messages, or managing assistants.
Typical use cases include:
- Listing all assistants to allow users to pick one for interaction.
- Automating workflows that depend on specific assistants by fetching their IDs programmatically.
- Integrating assistant management into larger automation pipelines.
For example, you might use this node to get all assistants and then run a conversation thread with a selected assistant based on user input or other logic.
Properties
| Name | Meaning |
|---|---|
| Authentication | Choose which credentials to use: - OpenAI Analytics API (dedicated analytics credentials) - OpenAI API (existing OpenAI API credentials) |
Output
The output is an array of objects representing assistants. Each object contains:
name: The display name of the assistant (or a fallback string like "Assistant (ID)" if no name is set).value: The unique identifier (ID) 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 in the name field.
The output does not include binary data.
Example output JSON structure:
[
{
"name": "Assistant Alpha",
"value": "assistant-id-123"
},
{
"name": "Assistant Beta",
"value": "assistant-id-456"
}
]
Dependencies
- Requires valid API credentials for either the OpenAI Analytics API or the standard OpenAI API.
- The node uses the official OpenAI SDK to communicate with the OpenAI services.
- Network access to the OpenAI API endpoint (
https://api.openai.com/v1by default, or a custom base URL if configured).
Troubleshooting
- Error loading credentials: This occurs if the node cannot retrieve the required API key or organization ID from the configured credentials. Ensure that the credentials are correctly set up in n8n and have the necessary permissions.
- Error loading assistants: Indicates a failure in calling the OpenAI API to list assistants. Possible causes include network issues, invalid API keys, or insufficient permissions. Verify API connectivity and credential validity.
- No assistants found: Means the account has no assistants created yet. You may need to create assistants before using them.
- If the node throws an "Unsupported resource" error, it means the resource parameter was set incorrectly; ensure it is set to "assistant" for this operation.
Links and References
This summary focuses exclusively on the "Get Assistants" operation under the "Assistant" resource as requested.