Actions6
- Dataset Actions
- Span Actions
- Feedback Actions
- Guardrail Actions
- Trace Actions
- Prompt Actions
Overview
This node interacts with the Opik API to retrieve prompt data. Specifically, the 'Get Prompt' operation allows users to fetch details about a specific prompt by selecting or specifying its name or ID, and optionally selecting a version of the prompt. It is useful for workflows that need to dynamically access prompt configurations or templates stored in the Opik system, such as automating content generation or managing prompt versions.
Use Case Examples
- A user wants to retrieve the latest version of a prompt by its name to use in a content generation workflow.
- A user needs to fetch a specific version of a prompt by ID to ensure consistent output in an automation process.
Properties
| Name | Meaning |
|---|---|
| Prompt Name or ID | The identifier or name of the prompt to retrieve. Users can select from a list or specify an ID using an expression. |
| Prompt Version Name or ID | The version of the prompt to retrieve. Defaults to the latest version but can be set to a specific version by selecting from a list or using an expression. |
| Generate N8n Template | Determines whether to add an 'n8n_template' field with placeholders converted to JSON expressions for use within n8n workflows. |
| Request Options | Settings to control request behavior such as batching, SSL certificate validation, proxy usage, and timeout duration. |
Output
JSON
prompt- The retrieved prompt data including its details and content.n8n_template- Optional field containing the prompt with placeholders converted to n8n JSON expressions if 'Generate N8n Template' is enabled.
Dependencies
- Opik API with an API key credential for authentication
Troubleshooting
- If the prompt ID or name is incorrect or not found, the node may return an error or empty result. Verify the prompt exists in the Opik system.
- If the selected prompt version does not exist, the node may fail to retrieve data. Ensure the version is valid or use 'latest'.
- Network issues such as proxy misconfiguration or SSL certificate problems can cause request failures. Check proxy settings and SSL options.
- Timeout errors may occur if the server is slow to respond. Adjust the timeout setting as needed.
Links
- n8n Expressions Documentation - Documentation on how to use expressions in n8n for dynamic input values.