Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
help: Move outgoing-webhooks from API docs to help center.
Lauryn Menard9097788300aa
diff --git a/api_docs/deploying-bots.md b/api_docs/deploying-bots.mdindex c6deedc12b6..969bef7fe74 100644--- a/api_docs/deploying-bots.md+++ b/api_docs/deploying-bots.md@@ -228,7 +228,7 @@ Botserver with SSL using an `nginx` or `Apache` reverse proxy and### Troubleshooting- Make sure the API key you're using is for an [outgoing webhook- bot](/api/outgoing-webhooks) and you've+ bot](/help/outgoing-webhooks) and you'vecorrectly configured the URL for your Botserver.- Your Botserver needs to be accessible from your Zulip server overdiff --git a/api_docs/outgoing-webhook-payload.md b/api_docs/outgoing-webhook-payload.mdindex b81dad70e61..4af96ed71bb 100644--- a/api_docs/outgoing-webhook-payload.md+++ b/api_docs/outgoing-webhook-payload.md@@ -1,6 +1,6 @@# Outgoing webhook payloads-Zulip supports [outgoing webhooks](/api/outgoing-webhooks) in a clean,+Zulip supports [outgoing webhooks](/help/outgoing-webhooks) in a clean,native [Zulip format](#zulip-format), as well as in a [Slack-compatibleformat](#slack-compatible-format).diff --git a/api_docs/sidebar_index.md b/api_docs/sidebar_index.mdindex 994b1c166bf..3e5bd95a2bc 100644--- a/api_docs/sidebar_index.md+++ b/api_docs/sidebar_index.md@@ -12,7 +12,7 @@* [Writing tests for bots](/api/writing-tests-for-interactive-bots)* [Running bots](/api/running-bots)* [Deploying bots](/api/deploying-bots)-* [Outgoing webhooks](/api/outgoing-webhooks)+* [Outgoing webhooks](/help/outgoing-webhooks)## REST APIdiff --git a/starlight_help/astro.config.mjs b/starlight_help/astro.config.mjsindex 8185b72b4dd..84c4c9bf235 100644--- a/starlight_help/astro.config.mjs+++ b/starlight_help/astro.config.mjs@@ -667,6 +667,7 @@ export default defineConfig({},"view-your-bots","view-all-bots-in-your-organization",+ "outgoing-webhooks",],},{diff --git a/api_docs/outgoing-webhooks.md b/starlight_help/src/content/docs/outgoing-webhooks.mdxsimilarity index 68%rename from api_docs/outgoing-webhooks.mdrename to starlight_help/src/content/docs/outgoing-webhooks.mdxindex b7c9908e38d..ce29946d91d 100644--- a/api_docs/outgoing-webhooks.md+++ b/starlight_help/src/content/docs/outgoing-webhooks.mdx@@ -1,7 +1,14 @@-# Outgoing webhooks+---+title: Outgoing webhooks+---++import {TabItem, Tabs} from "@astrojs/starlight/components";++import FlattenedSteps from "../../components/FlattenedSteps.astro";+import NavigationSteps from "../../components/NavigationSteps.astro";Outgoing webhooks allow you to build or set up Zulip integrations-which are notified when certain types of messages are sent in Zulip+which are notified when certain types of messages are sent in Zulip.When one of those events is [triggered](#triggering), the Zulip serverwill send an HTTP POST [payload](/api/outgoing-webhook-payload) to thewebhook's configured URL.@@ -12,34 +19,31 @@ is built on top of this API.## Create an outgoing webhook bot user-{start_tabs}--{tab|desktop-web}--{settings_tab|your-bots}--1. Click **Add a new bot**.--1. Set **Bot type** to **Outgoing webhook**.--1. Fill out the fields, with **Endpoint URL** set to the URL you'd like- Zulip to post to, and the outgoing webhook [format](/api/outgoing-webhook-payload)- you plan on using.--1. Click **Add**.--{end_tabs}+<Tabs>+ <TabItem label="Desktop/Web">+ <FlattenedSteps>+ <NavigationSteps target="settings/your-bots" />++ 1. Click **Add a new bot**.+ 1. Set **Bot type** to **Outgoing webhook**.+ 1. Fill out the fields, with **Endpoint URL** set to the URL you'd like+ Zulip to post to, and the outgoing webhook [format](/api/outgoing-webhook-payload)+ you plan on using.+ 1. Click **Add**.+ </FlattenedSteps>+ </TabItem>+</Tabs>## TriggeringThere are currently two ways to trigger an outgoing webhook:-* **@-mention** the bot user in a channel. If the bot- [replies](#replying-with-a-message), its reply will be sent to that- channel and topic.-* **Send a direct message** with the bot user as one of the recipients.- If the bot [replies](#replying-with-a-message), its reply will be- sent to that direct message conversation.+* **@-mention** the bot user in a channel. If the bot+ [replies](#replying-with-a-message), its reply will be sent to that+ channel and topic.+* **Send a direct message** with the bot user as one of the recipients.+ If the bot [replies](#replying-with-a-message), its reply will be+ sent to that direct message conversation.## Timeoutsdiff --git a/starlight_help/src/content/docs/restrict-bot-creation.mdx b/starlight_help/src/content/docs/restrict-bot-creation.mdxindex 32fbc3a84bd..08e389d924f 100644--- a/starlight_help/src/content/docs/restrict-bot-creation.mdx+++ b/starlight_help/src/content/docs/restrict-bot-creation.mdx@@ -54,5 +54,5 @@ individual [users](/help/introduction-to-users).* [Add a bot or integration](/help/add-a-bot-or-integration)* [Deactivate or reactivate a bot](/help/deactivate-or-reactivate-a-bot)* [Incoming webhooks](https://zulip.readthedocs.io/en/latest/webhooks/incoming-webhooks-overview.html)-* [Outgoing webhooks](/api/outgoing-webhooks)+* [Outgoing webhooks](/help/outgoing-webhooks)* [Non-webhook integrations](/api/non-webhook-integrations)diff --git a/templates/corporate/comparison_table_integrated.html b/templates/corporate/comparison_table_integrated.htmlindex f2a23c1a99d..8dc4966d3a4 100644--- a/templates/corporate/comparison_table_integrated.html+++ b/templates/corporate/comparison_table_integrated.html@@ -595,7 +595,7 @@</tr><tr><td class="comparison-table-feature">- <a href="/api/outgoing-webhooks">+ <a href="/help/outgoing-webhooks">Custom webhooks</a></td>diff --git a/templates/corporate/for/business.html b/templates/corporate/for/business.htmlindex 77eb88c6d71..d546ce7d3ae 100644--- a/templates/corporate/for/business.html+++ b/templates/corporate/for/business.html@@ -282,7 +282,7 @@easy-to-use <a href="/api/">RESTfulAPI</a>, <a href="/api/installation-instructions">clientbindings</a>, <a href="https://zulip.readthedocs.io/en/latest/webhooks/incoming-webhooks-overview.html">incoming- webhooks</a>, <a href="/api/outgoing-webhooks">outgoing+ webhooks</a>, <a href="/help/outgoing-webhooks">outgoingwebhooks</a>and <a href="/api/running-bots">interactivebot framework</a>.diff --git a/templates/corporate/for/open-source.html b/templates/corporate/for/open-source.htmlindex 581ba4ab78c..f1babf85c89 100644--- a/templates/corporate/for/open-source.html+++ b/templates/corporate/for/open-source.html@@ -524,7 +524,7 @@easy-to-use <a href="/api/">RESTfulAPI</a>, <a href="/api/installation-instructions">clientbindings</a>, <a href="https://zulip.readthedocs.io/en/latest/webhooks/incoming-webhooks-overview.html">incoming- webhooks</a>, <a href="/api/outgoing-webhooks">outgoing+ webhooks</a>, <a href="/help/outgoing-webhooks">outgoingwebhooks</a>and <a href="/api/running-bots">interactivebot framework</a>.diff --git a/zerver/lib/test_helpers.py b/zerver/lib/test_helpers.pyindex b541817d536..c9fe3699464 100644--- a/zerver/lib/test_helpers.py+++ b/zerver/lib/test_helpers.py@@ -41,6 +41,7 @@ from zerver.lib.rate_limiter import RateLimitedIPAddr, rulesfrom zerver.lib.request import RequestNotesfrom zerver.lib.types import AnalyticsDataUploadLevelfrom zerver.lib.upload.s3 import S3UploadBackend+from zerver.lib.url_redirects import REDIRECTED_TO_HELP_DOCUMENTATIONfrom zerver.models import Client, Message, RealmUserDefault, Subscription, UserMessage, UserProfilefrom zerver.models.clients import clear_client_cache, get_clientfrom zerver.models.realms import get_realm@@ -571,6 +572,7 @@ def write_instrumentation_reports(full_suite: bool, include_webhooks: bool) -> N# This endpoint only returns 500 and 404 codes, so it doesn't get picked up# by find_pattern above and therefore needs to be exempt."self-hosted-billing/not-configured/",+ *(redirect.old_url.lstrip("/") for redirect in REDIRECTED_TO_HELP_DOCUMENTATION),*(webhook.url for webhook in INCOMING_WEBHOOK_INTEGRATIONS if not include_webhooks),}diff --git a/zerver/lib/url_redirects.py b/zerver/lib/url_redirects.pyindex 657ce05a966..6f9b00a6341 100644--- a/zerver/lib/url_redirects.py+++ b/zerver/lib/url_redirects.py@@ -7,6 +7,13 @@ class URLRedirect:new_url: str+# If redirecting to the help center, we no longer test the old URL+# in the backend test suite, so it should be added to this list+# even if it was originally in the API or policies documentation.+REDIRECTED_TO_HELP_DOCUMENTATION: list[URLRedirect] = [+ URLRedirect("/api/outgoing-webhooks", "/help/outgoing-webhooks"),+]+API_DOCUMENTATION_REDIRECTS: list[URLRedirect] = [# Add URL redirects for REST API documentation here:URLRedirect("/api/delete-stream", "/api/archive-stream"),@@ -35,7 +42,9 @@ LANDING_PAGE_REDIRECTS = [URLRedirect("/try-zulip/", "https://chat.zulip.org/?show_try_zulip_modal"),]-DOCUMENTATION_REDIRECTS = API_DOCUMENTATION_REDIRECTS + POLICY_DOCUMENTATION_REDIRECTS+DOCUMENTATION_REDIRECTS = (+ API_DOCUMENTATION_REDIRECTS + POLICY_DOCUMENTATION_REDIRECTS + REDIRECTED_TO_HELP_DOCUMENTATION+)# List of category slugs at the time of changing the URL scheme to have# `/category` be appended before the category slug. This list does not