Langfuse Prompt
AI-generatedSummary
Fetch a prompt template from Langfuse by name and label, then render it by replacing variables with provided key-value pairs.
Inputs
- Prompt Name (required) — The name of the prompt template to fetch from Langfuse.
- Prompt Label — Optional label for the prompt version; defaults to "production" if not specified.
- Keep Original on Error — Boolean flag to determine whether to keep original variable placeholders (like {{variable}}) if the variable is missing or an expression fails during rendering; if false, those placeholders are replaced with an empty string.
- Variables — Key-value pairs used to render the prompt template by replacing variable placeholders.
Output shape
a single JSON object containing the prompt name, label, the raw prompt template as fetched, the variables used for rendering, and the final rendered prompt string
The operation returns an array with one item representing the processed prompt. No pagination applies. Errors related to variable parsing or HTTP are thrown as node errors.
Examples
Example 1: Fetch and render a prompt named "welcomeMessage" with label "production" by substituting variables like username and date.
Set Prompt Name to "welcomeMessage", optionally set Prompt Label or leave as "production", provide Variables with assignments for username and date, and choose whether to keep original placeholders on error.