This article describes how to send LangSmith alert notifications to a Slack channel using a Slack Workflow Builder webhook trigger. The workflow receives the alert payload from LangSmith and renders the alert details into a formatted Slack message.
1. Create the Slack workflow
In Slack, click your workspace name → Tools & settings → Workflow Builder → New Workflow.
Choose From a webhook as the trigger.
Click Set up variables and add an entry for each LangSmith field you want to use. The variable name must match the JSON key exactly:
alert_rule_name(Text)project_name(Text)alert_rule_attribute(Text)triggered_metric_value(Text)triggered_threshold(Text)timestamp(Text)alert_rule_url(Text)runs_url(Text)
Save the trigger. Slack displays a webhook URL (
https://hooks.slack.com/triggers/...). Copy it for step 3.
2. Build the message
Add a Send a message step and select the target channel.
In the message body, click the
{}insert-variable icon (or type/and select Insert a variable) to add each variable as a chip. Variables must be inserted via the picker, not typed as literal text.Example layout (each token in brackets is a variable chip):
🚨 [alert_rule_name] triggered for [project_name] [alert_rule_attribute]: [triggered_metric_value] (threshold [triggered_threshold]) [timestamp] <[alert_rule_url]|View alert> · <[runs_url]|View runs>Publish the workflow.
3. Configure the LangSmith alert
In LangSmith, open the tracing project and click the Alerts icon (top right) → Create Alert.
Define the metric and threshold (Run Count, Cost, Errors, Feedback Score, or Latency).
In the Notification section, select Webhook and configure:
Webhook URL: the Slack workflow trigger URL from step 1. Please note that this URL is authorized to write to your Slack channel when the Workflow is created in Slack.
Headers:
{ "Content-Type": "application/json" }Request Body Template:
{}
Click Send Test Alert to verify the message renders in the target channel, then Save.
Available fields
The following keys are sent by LangSmith with each alert and can be defined as workflow variables in step 1:
workspace_nameproject_namealert_rule_idalert_rule_namealert_rule_descriptionalert_rule_typealert_rule_attribute(error_count,feedback_score,latency, orcost)triggered_metric_valuetriggered_thresholdtimestamp(ISO-8601)alert_rule_urlruns_url