Routing LangSmith Alerts to Slack

Last updated: May 8, 2026

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

  1. In Slack, click your workspace name → Tools & settings → Workflow Builder → New Workflow.

  2. Choose From a webhook as the trigger.

  3. 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)

  4. Save the trigger. Slack displays a webhook URL (https://hooks.slack.com/triggers/...). Copy it for step 3.

2. Build the message

  1. Add a Send a message step and select the target channel.

  2. 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.

  3. 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>
  4. Publish the workflow.

3. Configure the LangSmith alert

  1. In LangSmith, open the tracing project and click the Alerts icon (top right) → Create Alert.

  2. Define the metric and threshold (Run Count, Cost, Errors, Feedback Score, or Latency).

  3. 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:

      {}
  4. 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_name

  • project_name

  • alert_rule_id

  • alert_rule_name

  • alert_rule_description

  • alert_rule_type

  • alert_rule_attribute (error_countfeedback_scorelatency, or cost)

  • triggered_metric_value

  • triggered_threshold

  • timestamp (ISO-8601)

  • alert_rule_url

  • runs_url

Additional resources