<@ULVA73B9P> Could the docs link be wrong on webho...
# ask-marvin
g
@Marvin Could the docs link be wrong on webhook in prefect-cloud? See screenshot below. It's a webhook call block that is used in automation to notify another system of flow state. The Docs link at the top points to incoming Webhooks that can be turned into events... https://docs.prefect.io/v3/concepts/webhooks
m
thought for 278.6 seconds
Short answer: yes — that “Docs” link is pointing to the page for incoming webhooks, which isn’t the right reference for the Automation action you’re using. - The link you’re seeing (Webhooks) covers incoming webhooks (turn external HTTP requests into Prefect events). - For the Automation action you’re configuring (an outgoing HTTP call), the more relevant doc is the Automations guide: Creating automations. That page covers the available actions (including Webhook call) and how to configure them. - If you do want incoming webhooks that create events, there’s also a Cloud how-to here: Create a webhook. If you can share the exact screen/URL where you clicked the “Docs” link (e.g., Automations > Action: Webhook call), I can file a fix to point it to the Automations docs.
g
@Marvin The links cover generaic automation not the call webhook specifically. Where can I find the docs for CallWebhook automation? the only thing I found so far was the wizard on the UI
m
thought for 285.5 seconds
You’re right to look for a dedicated page — today there isn’t a standalone doc that specifies the “Webhook call”/“CallWebhook” Automation action in detail. The current docs cover: - Incoming webhooks (turn external HTTP requests into Prefect events): Webhooks - General Automations setup (triggers and actions in the UI): Creating automations - Creating incoming webhooks in Cloud: Create a webhook But there’s no page that documents the outgoing “Webhook call” action’s specifics (method, headers, payload templating, retries) — the UI wizard is currently the only source. If you need more control or a documented surface right now, a reliable workaround is: - Use an Automation with the “Create flow run” action - Run a tiny flow that performs the HTTP call (so you fully control headers/auth/retries/timeout/payload) Example mini-flow:
Copy code
from prefect import flow
import httpx

@flow
def notify_system(url: str, payload: dict, headers: dict | None = None, timeout: float = 10.0, retries: int = 3):
    last_exc = None
    for _ in range(retries):
        try:
            r = <http://httpx.post|httpx.post>(url, json=payload, headers=headers, timeout=timeout)
            r.raise_for_status()
            return r.json() if r.headers.get("content-type","").startswith("application/json") else r.text
        except Exception as exc:
            last_exc = exc
    raise last_exc
Then in your Automation’s “Create flow run” action, pass
url
,
payload
, and
headers
as parameters (you can template them from the triggering event). If you can share the exact screen where the “Docs” link appears (Automations > Action: Webhook call) I’ll file a docs fix to: - Point that link away from the incoming Webhooks page - Add a short section documenting “Webhook call” action behavior and fields Also, what details do you need most for “CallWebhook” (HTTP method options, headers, templating variables, auth, retries/timeouts)? I can test and confirm specifics and get them added to the docs.