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
Summary
Running prefect automation ls fails with a Pydantic ValidationError when any automation in the workspace includes the Send Email action created via the Cloud UI. The action serializes as send-email-notification. The 3.4.20 client appears to lack this action type in its automation action union, causing deserialization to fail.
Reproduction
In Prefect Cloud UI, create an Automation with a Send Email action (created on Sep 28, 2025 in this case).
From a local environment with Prefect 3.4.20, run:
prefect automation ls
Observe the CLI fails with a Pydantic ValidationError.
Observed error (truncated)
Traceback (most recent call last):
...
File ".../prefect/client/orchestration/_automations/client.py", line 204, in read_automations
return Automation.model_validate_list(response.json())
...
pydantic_core._pydantic_core.ValidationError: 17 validation errors for Automation
actions.1.DoNothing.type
Input should be 'do-nothing' [type=literal_error, input_value='send-email-notification', input_type=str]
For further information visit https://errors.pydantic.dev/2.11/v/literal_error
Impact
prefect automation ls fails entirely if any automation includes the Send Email action. Removing that action from the automation allows ls to succeed again.
Likely also affects prefect automation inspect for the impacted automation(s).
Expected
The CLI should recognize the send-email-notification action type (or otherwise tolerate/ignore unknown action types) and list automations successfully.
Notes / Hypothesis
The SDK exposes a SendNotification action (class prefect.events.actions.SendNotification), but the server returns send-email-notification. This suggests a client/server schema mismatch introduced after 3.4.20 was released (automation was created Sep 28, 2025; 3.4.20 released Sep 25, 2025).
Fix likely involves adding send-email-notification to the client-side action union or aliasing it to SendNotification.
Workarounds
Manage automations from the UI.
Temporarily remove the Send Email action from automations to allow prefect automation ls to work.
Use prefect automation inspect for unaffected automations, or call the REST API directly to bypass client-side model validation.
Request
Patch release of the Python client to recognize send-email-notification (or to be resilient to unknown action types) so the CLI can list automations when this action is present.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
This discussion was created from a Slack thread conversation.
Original Thread: https://prefect-community.slack.com/archives/C04DZJC94DC/p1759348193259749
Environment
Summary
Running
prefect automation ls
fails with a Pydantic ValidationError when any automation in the workspace includes the Send Email action created via the Cloud UI. The action serializes assend-email-notification
. The 3.4.20 client appears to lack this action type in its automation action union, causing deserialization to fail.Reproduction
Observed error (truncated)
Impact
prefect automation ls
fails entirely if any automation includes the Send Email action. Removing that action from the automation allowsls
to succeed again.prefect automation inspect
for the impacted automation(s).Expected
send-email-notification
action type (or otherwise tolerate/ignore unknown action types) and list automations successfully.Notes / Hypothesis
SendNotification
action (classprefect.events.actions.SendNotification
), but the server returnssend-email-notification
. This suggests a client/server schema mismatch introduced after 3.4.20 was released (automation was created Sep 28, 2025; 3.4.20 released Sep 25, 2025).send-email-notification
to the client-side action union or aliasing it toSendNotification
.Workarounds
prefect automation ls
to work.prefect automation inspect
for unaffected automations, or call the REST API directly to bypass client-side model validation.Request
send-email-notification
(or to be resilient to unknown action types) so the CLI can list automations when this action is present.Related docs
This discussion was automatically created by the Marvin bot to preserve valuable community insights.
Beta Was this translation helpful? Give feedback.
All reactions