{#if workspaceConfig} {@render workspaceConfig()} {/if} {#if teamName || workspaceSpecificConnection}
{#if display_name} Workspace connected to {capitalizedPlatform} team '{display_name}' {/if}
{:else if !hideConnectButton}
{#if platform === 'teams'} {#if $enterpriseLicense && isOAuthEnabled} { const errorMsg = typeof (e as any)?.body === 'string' ? (e as any).body : e?.message || 'Unknown error' sendUserToast('Failed to load teams: ' + errorMsg, true) }} /> {/if} {:else} {/if}
{/if}
{#if teamName && ($enterpriseLicense || platform === 'slack') && (scriptPath === '' || scriptPath === undefined)} {#if itemKind === 'script'} {:else if itemKind === 'flow'} {/if} {/if}
{#if !teamName}
Please connect your workspace to {capitalizedPlatform} to use this feature
{/if}
Upon connection, templates for a script and flow are available.

The script or flow chosen is passed the parameters `response_url: string` and `text: string` respectively the url to reply directly to the trigger and the text of the command.

It can take additionally the following args: channel_id, user_name, user_id, command, trigger_id, api_app_id

The script or flow is permissioned as group "{platform}" that will be automatically created after connection to {platform.charAt(0).toUpperCase() + platform.slice(1)}.

See more on documentation.