gee
08/21/2025, 11:05 AMMarvin
08/21/2025, 11:05 AMMarvin
08/21/2025, 11:10 AMgee
08/21/2025, 11:12 AMMarvin
08/21/2025, 11:12 AMMarvin
08/21/2025, 11:17 AMfrom 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.