<@ULVA73B9P> I tried setting up a block using the ...
# ask-community
b
@Marvin I tried setting up a block using the Custom Webhook type, when I click the 'Create' button, none of the parameters show up in the UI. Any suggestions?
m
thought for 263.5 seconds
Thanks for flagging this — a couple things can cause an empty form for a block type in the UI. A few quick checks and fixes you can try: First, a couple clarifying questions - Are you on Prefect Cloud or self-hosted Prefect Server? - Which Prefect version are you running? - Is this the Notifications “Custom Webhook” block (prefect.blocks.notifications.CustomWebhookNotificationBlock) or the generic Webhook block (prefect.blocks.webhook.Webhook)? Common fixes 1) Re-register the block types (especially if you’re self-hosting or recently upgraded) - This refreshes the UI schema used to render the form.
Copy code
prefect block register -m prefect.blocks.notifications
prefect block register -m prefect.blocks.webhook
Then refresh the UI and try again. 2) Verify the block type is present and has a schema
Copy code
prefect block type ls
prefect block type inspect "Custom Webhook"
If the schema looks empty or the type is missing, re-run the register commands above. 3) Update/align versions and clear cache - Make sure your UI/API are on the same Prefect 3.x version. - Hard refresh the browser or try an incognito window. Ad/script blockers can sometimes prevent the form from rendering, so try disabling those for the UI domain. 4) Workaround: create the block in code, then use it from the UI - For the Notifications Custom Webhook block:
Copy code
from prefect.blocks.notifications import CustomWebhookNotificationBlock

block = CustomWebhookNotificationBlock(
    url="<https://example.com/webhook>",
    method="POST",
    headers={"Authorization": "Bearer <token>"},
    json_data={"text": "Hello from Prefect"}
)
block.save("my-custom-webhook", overwrite=True)
- For the generic Webhook block:
Copy code
from prefect.blocks.webhook import Webhook

hook = Webhook(
    url="<https://example.com/webhook>",
    method="POST",
    headers={"Authorization": "Bearer <token>"}
)
hook.save("my-webhook", overwrite=True)
If this still doesn’t render the form, could you share whether you’re on Cloud vs Server, your Prefect version, and any browser console/network errors when loading the “Create” page? That’ll help us pinpoint whether it’s a registration mismatch or a UI/API request failing. Helpful docs - Blocks overview - Notification blocks API (includes Custom Webhook) - Webhook block API
b
@Marvin I'm using Prefect cloud, and prefect version 3.4.14 I re-registered all the prefect.block.notifications When I run
prefect block type inspect custom-webhook
I only get the Slug, Block Type id and Description attributes back and a message that says
No schema found for the custom-webhook block type
m
thought for 182.9 seconds
Thanks for the details — that message explains the empty form. What’s happening When the UI says “No schema found for the custom-webhook block type”, it means your workspace has the block type record but not its schema. Without a schema, the UI can’t render any parameters, so the form looks empty. Most common cause Registering the wrong module path or registering against a different workspace/profile. I noticed you mentioned “prefect.block.notifications” — the correct module is “prefect.blocks.notifications” (plural). What to do 1) Re-register the correct modules to your current workspace Make sure your CLI is authenticated to the same Prefect Cloud workspace you’re viewing in the UI:
Copy code
prefect auth status
Then register both of these:
Copy code
prefect block register -m prefect.blocks.notifications
prefect block register -m prefect.blocks.webhook
2) Confirm the schema is present
Copy code
prefect block type inspect custom-webhook
You should see a Schema section with fields like
url
,
method
,
headers
,
json_data
, etc. If you still see “No schema found…”, double-check you’re on the same workspace/profile as the UI and re-run the register command. 3) Workaround: create the block in code (also pushes the type/schema) If you need an immediate unblock, saving a block instance from code will also ensure the type exists in your workspace:
Copy code
from prefect.blocks.notifications import CustomWebhookNotificationBlock

block = CustomWebhookNotificationBlock(
    url="<https://example.com/webhook>",
    method="POST",
    headers={"Authorization": "Bearer <token>"},
    json_data={"text": "Hello from Prefect"}
)
block.save("my-custom-webhook", overwrite=True)
After this, the UI should show parameters for that block type as well. If it still doesn’t work - Please paste the output of
prefect auth status
and
prefect block register -m prefect.blocks.notifications
- Confirm the workspace in the Cloud UI matches the one shown by the CLI Docs for reference - Blocks overview - Notification blocks API (includes Custom Webhook) - Webhook block API
b
@Marvin Ok, that worked. Thanks I now have a block created and attached it as an action for an automation. Every time I trigger the automation, I get this message:
The notification block was invalid: KeyError(\"No class found for dispatch key 'custom-webhook' in registry for type 'Block'.\"
m
thought for 339.1 seconds
Thanks for the extra context — that error points to a known limitation. What’s going on - Your workspace now knows about the block type (you registered it), but the Cloud Automations service can’t import the class for the slug
custom-webhook
when executing the “Send a notification” action. - This manifests as: KeyError("No class found for dispatch key 'custom-webhook' in registry for type 'Block'.") - It’s the same symptom reported here: CustomWebhook block type not found on Automation action In short: the Custom Webhook notification block isn’t yet wired into the Cloud Automations runner, so the action can’t instantiate it even though your workspace can save/use it. Workarounds you can use today - If your provider is supported, switch to one of the built-in notification blocks (Slack, PagerDuty, Opsgenie, Teams, Email). These work in Automations. - Or, run a small “notifier” flow from the automation instead of the “Send a notification” action: 1) Create a flow that uses your block to send the webhook 2) Deploy that flow 3) In your Automation, use the “Run a deployment” action to trigger that deployment Example notifier flow:
Copy code
from prefect import flow
from prefect.blocks.notifications import CustomWebhookNotificationBlock

@flow
def send_custom_webhook():
    block = CustomWebhookNotificationBlock.load("my-custom-webhook")
    block.notify("Automation triggered")  # customize body as needed

if __name__ == "__main__":
    send_custom_webhook()
Then create a deployment for that flow and wire it to your Automation. Next steps - If you’re open to it, please upvote/comment on the issue so we can keep you posted: GitHub issue #13282 - I can also flag this with the team and update you when Cloud automations support for the Custom Webhook block is live. If you share your target webhook/service, I can suggest the best built-in block or help tailor the notifier flow to your payload.