Langfuse icon

Langfuse

Fetches a prompt from Langfuse Prompt Management

Overview

This node integrates with Langfuse Prompt Management to retrieve a specific prompt by its name and deployment label. It is useful when you want to fetch the details or content of a prompt stored in Langfuse, for example, to review, audit, or use it dynamically in your workflows.

Typical scenarios include:

  • Fetching a prompt configuration before running an AI model.
  • Retrieving prompt versions labeled as "production" or other deployment stages.
  • Automating prompt management tasks within n8n workflows.

Properties

Name Meaning
Prompt Name The exact name of the prompt to retrieve from Langfuse.
Prompt Label The deployment label of the prompt version to retrieve. Common values include "production".

Output

The node outputs the retrieved prompt data in the json field of the output item. This JSON contains all the details of the prompt as returned by the Langfuse API, including its content, metadata, and version information.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with Langfuse.
  • Needs the Langfuse host URL configured in the credentials.
  • The node makes a GET request to the Langfuse API endpoint /api/public/v2/prompts/{promptName} with a query parameter for the label.

Troubleshooting

  • Prompt Not Found: If the prompt name does not exist, the API will likely return a 404 error. Verify the prompt name spelling and existence in Langfuse.
  • Authentication Errors: Ensure that the API key credential and host URL are correctly set up in n8n.
  • Incorrect Label: Using a label that does not exist for the prompt may result in no data or errors. Confirm the deployment label is valid.
  • Network Issues: Check connectivity to the Langfuse API endpoint.

Links and References

  • Langfuse Documentation (for API details and prompt management)
  • n8n HTTP Request Node documentation (for understanding how API calls are made)

Discussion