{"record":{"id":"3959a49d5321d247","repo":"windmill-labs/windmill","slug":"feature-not-supported-in-cloud-hosted-windmill","errorCode":null,"errorMessage":"Feature not supported in cloud hosted windmill","messagePattern":"Feature not supported in cloud hosted windmill","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/windmill-api/src/jobs.rs","lineNumber":2618,"sourceCode":"    email_recipients: Option<Vec<String>>,\n    error: Value,\n}\n\n#[cfg(all(feature = \"enterprise\", feature = \"instance_smtp\"))]\nasync fn send_email_with_instance_smtp(\n    authed: ApiAuthed,\n    Extension(db): Extension<DB>,\n    Path(w_id): Path<String>,\n    Json(send_email): Json<SendEmail>,\n) -> error::Result<Json<String>> {\n    use windmill_common::jobs::EMAIL_ERROR_HANDLER_USER_EMAIL;\n    use windmill_queue::SCHEDULE_ERROR_HANDLER_USER_EMAIL;\n\n    if *CLOUD_HOSTED {\n        tracing::warn!(\n                \"Workspace trigger failure email notification is not available for cloud hosted Windmill\",\n            );\n        return Err(anyhow::anyhow!(\"Feature not supported in cloud hosted windmill\").into());\n    }\n\n    let is_handler_job = authed.email == EMAIL_ERROR_HANDLER_USER_EMAIL\n        || authed.email == SCHEDULE_ERROR_HANDLER_USER_EMAIL;\n\n    if !is_handler_job && !windmill_api_auth::is_super_admin_authed(&db, &authed).await? {\n        return Err(Error::NotAuthorized(\n            \"Only super admin or whitelisted token can access email workspace error handler feature\"\n                .to_string(),\n        ));\n    }\n\n    // Missing/empty `email_recipients` is a schedule-level misconfiguration (e.g. the\n    // user picked the email handler in the UI but never entered an address). Log a warning\n    // and return a client error — do NOT escalate to `report_critical_error`, which would\n    // fan this out to the instance critical-error channels on every failed run.\n    let Some(recipients) = send_email.email_recipients.as_ref() else {\n        tracing::warn!(","sourceCodeStart":2600,"sourceCodeEnd":2636,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/windmill-api/src/jobs.rs#L2600-L2636","documentation":"When the instance runs in cloud-hosted mode (CLOUD_HOSTED flag), configuring workspace trigger failure email notifications is disabled; the endpoint logs a warning and returns 'Feature not supported in cloud hosted windmill'. Additionally the code path guards that only the error-handler users or superadmins may configure it.","triggerScenarios":"A user (or the scheduler error-handler route) on app.windmill.com (or any CLOUD_HOSTED=true instance) attempts to enable/modify email notifications for trigger failures.","commonSituations":"Setting up error email alerts on the hosted Windmill cloud; migrating self-hosted flows that used email notifications to the cloud edition; scripts calling the trigger settings API against the cloud.","solutions":["Use Windmill's web UI notification integrations available on cloud (e.g. Slack/webhook based error handlers) instead of direct email","Self-host Windmill (CLOUD_HOSTED=false) to enable trigger failure email notifications","Set up error handling inside the flow/script itself (error handler steps) rather than relying on email notification settings"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before enabling trigger error email notifications\nif is_cloud_hosted() {\n    disableEmailToggle(); // show \"available on self-hosted only\"\n}","typeGuard":null,"tryCatchPattern":"match set_trigger_error_email(authed, db, payload).await {\n    Ok(cfg) => cfg,\n    Err(e) if e.to_string().contains(\"not supported in cloud hosted\") => {\n        notify_user(\"Email notifications require self-hosted Windmill; use webhooks instead\");\n        fallback_to_webhook_error_handler()\n    }\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Hide/disable the email-notification toggle in the UI when instance is cloud-hosted","Use Slack/webhook error notifications on cloud","Handle failure alerts inside flow error-handler steps"],"tags":["cloud","notifications","email","triggers"],"backgroundTag":"feature-not-supported-on-cloud","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}