{#if handlerSelected === 'custom'}
{#if !handlerPath} {/if}
{#if showScriptHelpText}
Example of error handler scripts can be found on Windmill Hub
{/if} {#if handlerPath}

Extra arguments

{#await import('$lib/components/SchemaForm.svelte')} {:then Module} {/await} {#if customHandlerSchema && customHandlerSchema.properties && Object.keys(customHandlerSchema.properties).length === 0}
This error handler takes no extra arguments
{/if} {/if} {:else if handlerSelected === 'slack'} { if (e.detail && errorOrRecovery === 'error') { handlerPath = slackHandlerScriptPath } else if (e.detail && errorOrRecovery === 'recovery') { handlerPath = slackRecoveryHandler } else if (e.detail && errorOrRecovery === 'success') { handlerPath = slackSuccessHandler } else { handlerPath = undefined } }} /> {#if workspaceConnectedToSlack} {#await import('$lib/components/SchemaForm.svelte')} {:then Module} {/await} {:else if workspaceConnectedToSlack == undefined} {/if} {#if $enterpriseLicense && isSlackHandler(handlerPath)} {#if workspaceConnectedToSlack == false}

The workspace needs to be connected to Slack to use this feature. You can configure it here.

{:else} {#if connectionTestJob !== undefined}

{#if connectionTestJob.in_progress} {:else if connectionTestJob.is_success} {:else} {/if} Message sent via Windmill job {connectionTestJob.uuid}

{/if} {/if} {/if} {:else if handlerSelected === 'teams'} { if (e.detail && errorOrRecovery === 'error') { handlerPath = teamsHandlerScriptPath } else if (e.detail && errorOrRecovery === 'recovery') { handlerPath = teamsRecoveryHandler } else if (e.detail && errorOrRecovery === 'success') { handlerPath = teamsSuccessHandler } else { handlerPath = undefined } }} /> {#if workspaceConnectedToTeams}

Teams Channel

{ handlerExtraArgs['channel'] = channel?.channel_id handlerExtraArgs['channel_name'] = channel?.channel_name }} onError={(e) => sendUserToast('Failed to load channels: ' + e.message, true)} />

This workspace is connected to Team: {teams_team_name}

Each workspace can only be connected to one Microsoft Teams team. You can configure it under workspace settings.
{:else if workspaceConnectedToTeams == undefined} {/if} {#if $enterpriseLicense && isTeamsHandler(handlerPath)} {#if workspaceConnectedToTeams == false}

The workspace needs to be connected to Teams to use this feature. You can configure it under workspace settings.

{:else} {#if connectionTestJob !== undefined}

{#if connectionTestJob.in_progress} {:else if connectionTestJob.is_success} {:else} {/if} Message sent via Windmill job {connectionTestJob.uuid}

{/if} {/if} {/if} {:else if handlerSelected === 'email'} {#if isCloudHosted()} Email notifications for trigger failures are only available in self-hosted Windmill instances. {:else}
Configure email addresses to receive notifications when jobs fail. This feature requires SMTP to be configured.
handlerExtraArgs[EMAIL_RECIPIENTS_KEY] ?? [], (recipients) => (handlerExtraArgs[EMAIL_RECIPIENTS_KEY] = recipients) } placeholder="Enter email addresses..." onCreateItem={(email) => { const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/ if (!emailRegex.test(email)) { sendUserToast('Invalid email format', true) return } const currentArray = handlerExtraArgs[EMAIL_RECIPIENTS_KEY] ?? [] handlerExtraArgs[EMAIL_RECIPIENTS_KEY] = [...currentArray, email] }} class="w-full" /> {#if handlerExtraArgs[EMAIL_RECIPIENTS_KEY]?.length > 0} {handlerExtraArgs[EMAIL_RECIPIENTS_KEY]?.length} email{handlerExtraArgs[ EMAIL_RECIPIENTS_KEY ]?.length === 1 ? '' : 's'} configured {/if}
{/if} {/if}