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
Copy file name to clipboardExpand all lines: src/langsmith/alerts-webhook.mdx
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,7 +120,13 @@ Here is an example for configuring LangSmith alerts to send notifications to Sla
120
120
3. Review the permissions and click **Allow**
121
121
4. Copy the **Bot User OAuth Token** that appears (begins with `xoxb-`)
122
122
123
-
### Step 4: Configure the Webhook Alert in LangSmith
123
+
### Step 4: Add the Bot to a Slack Channel
124
+
125
+
Add the bot to the specific channel you want to receive alerts in. You can add a bot to a Slack channel by mentioning it in the message field (e.g., `@botname`).
126
+
127
+
You also need the channel ID to configure the webhook alert in LangSmith. You can find the channel ID by opening channel details > About
128
+
129
+
### Step 5: Configure the Webhook Alert in LangSmith
> **Note:** Replace `xoxb-your-token-here` with your actual Bot User OAuth Token
147
-
148
153
**Request Body Template**
154
+
<Note>It is required to fill in the `{channel_id}` from the value found in Step 4. <br /><br />The remaining fields: `alert_name`, `project_name` and `project_url` optionally add additional context to the alert message. You can find your `project_url` in the browser's URL bar. Copy the portion up to but not including any query parameters.</Note>
**NOTE:** Fill in the `channel_id`, `alert_name`, `project_name` and `project_url` when creating the alert. You can find your `project_url` in the browser's URL bar. Copy the portion up to but not including any query parameters.
181
-
182
186
6. Click **Save** to activate the webhook configuration
183
187
184
-
### Step 5: Test the Integration
188
+
### Step 6: Test the Integration
185
189
186
190
1. In the LangSmith alert configuration, click **Test Alert**
187
191
2. Check your specified Slack channel for the test notification
188
192
3. Verify that the message contains the expected alert information
189
193
190
-
### (Optional) Step 6: Link to the Alert Preview in the Request Body
194
+
### (Optional) Step 7: Link to the Alert Preview in the Request Body
191
195
192
196
After creating an alert, you can optionally link to its preview in the webhook's request body.
193
197
@@ -197,7 +201,7 @@ To configure this:
197
201
198
202
1. Save your alert
199
203
2. Find your saved alert in the alerts table and click it
200
-
3. Copy the dsiplayed URL
204
+
3. Copy the displayed URL
201
205
4. Click "Edit Alert"
202
206
5. Replace the existing project URL with the copied alert preview URL
0 commit comments