You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Webhook actions currently let users configure the URL and headers, but the
request body is always a fixed JSON envelope (id, timestamp, type, apiVersion, plus a type-specific payload / prompt / event object).
I'd like to propose an optional custom body template for webhook actions:
The webhook action config gains an optional bodyTemplate field.
Filled → the body is rendered from the template using a safe templating
engine (e.g. Handlebars) over the same variables already exposed in the
envelope (payload.*, id, timestamp, type, ...).
The rendered output is validated as JSON before sending, and x-langfuse-signature continues to sign the rendered body, so existing
signature verification keeps working.
UI: a template editor with a variable reference, a live preview rendered
from sample data, and a "send test webhook" button (the final rendered
request body is currently not visible anywhere, so this would help
debugging integrations in general).
Why this is needed
Many downstream systems — internal alert gateways, on-prem monitoring
platforms, incident tools with their own event schemas — require a specific
request body format. Today the only options are:
deploying a separate adapter/proxy just to translate the payload, or
maintaining a fork of the worker.
There is already precedent for format flexibility in the automations
framework: SLACK actions support a messageTemplate, and GITHUB_DISPATCH wraps the payload in event_type / client_payload. An
optional template for WEBHOOK actions would complete this picture and
remove the need for a translation hop. It would apply uniformly to all
three webhook payload types (monitor-alert, prompt-version, project-notification).
In our case we're routing Langfuse monitor alerts into an internal alerting
platform that mandates its own body schema, which is what surfaced the
limitation.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Describe the feature or potential improvement
Describe the feature
Webhook actions currently let users configure the URL and headers, but the
request body is always a fixed JSON envelope (
id,timestamp,type,apiVersion, plus a type-specificpayload/prompt/eventobject).I'd like to propose an optional custom body template for webhook actions:
bodyTemplatefield.compatible, no migration needed.
engine (e.g. Handlebars) over the same variables already exposed in the
envelope (
payload.*,id,timestamp,type, ...).x-langfuse-signaturecontinues to sign the rendered body, so existingsignature verification keeps working.
from sample data, and a "send test webhook" button (the final rendered
request body is currently not visible anywhere, so this would help
debugging integrations in general).
Why this is needed
Many downstream systems — internal alert gateways, on-prem monitoring
platforms, incident tools with their own event schemas — require a specific
request body format. Today the only options are:
There is already precedent for format flexibility in the automations
framework:
SLACKactions support amessageTemplate, andGITHUB_DISPATCHwraps the payload inevent_type/client_payload. Anoptional template for
WEBHOOKactions would complete this picture andremove the need for a translation hop. It would apply uniformly to all
three webhook payload types (
monitor-alert,prompt-version,project-notification).In our case we're routing Langfuse monitor alerts into an internal alerting
platform that mandates its own body schema, which is what surfaced the
limitation.
Additional information
No response
All reactions