{#if $flowStore.value.modules.length > 0 && $currentStepStore === undefined} All flow steps will be overriden {/if} { if ($currentStepStore !== undefined) { $currentStepStore = numberToChars(0) } }} > {#if flowCopilotMode === 'trigger'} Build a flow with two scripts, one that regularly checks for changes in an external system and a second that is executed for each change using a for-loop. For both steps, you can either choose a script from the hub or generate one from scratch using Windmill AI. The inputs of the for-loop action are automatically filled in with the ouputs of the trigger step. At the end of the process, flow inputs are inferred and you just need to fill them in.

The flow is automatically set to run every 15 minutes when deployed.
{:else} Build a flow with a sequence of scripts that are executed one after the other. For each step, you can either choose a script from the hub or generate one from scratch using Windmill AI. Each step inputs are automatically filled in with the previous step's outputs. At the end of the process, flow inputs are inferred and you just need to fill them in. {/if} {#each $modulesStore as copilotModule, i}
{#if i === 1 && $modulesStore[i - 1].type === 'trigger'}

For loop

{copilotModule.id}_loop
{/if}

{copilotModule.type === 'trigger' ? 'Trigger' : 'Action'}

{copilotModule.id}
{#if flowCopilotMode === 'sequence' && i >= 1} {/if}
{#if copilotModule.source !== undefined}
{#if copilotModule.source === 'hub' && copilotModule.selectedCompletion} {:else} {/if}
{copilotModule.source === 'hub' && copilotModule.selectedCompletion ? copilotModule.selectedCompletion.summary + ' (' + copilotModule.selectedCompletion.app + ')' : `Generate "${copilotModule.description}" in ${ copilotModule.lang === 'bun' ? 'TypeScript' : 'Python' }`}
{#if copilotModule.source === 'hub' && copilotModule.selectedCompletion && copilotModule.selectedCompletion?.kind !== 'script'} {capitalize(copilotModule.selectedCompletion.kind.toString())} {/if}
{#if $currentStepStore !== undefined && i < charsToNumber($currentStepStore)}

Already generated, edit step to regenerate from this point

{/if} {:else} { if (copilotModule.description.length > 2) { getHubCompletions(copilotModule.description, i, copilotModule.type) } else { copilotModule.hubCompletions = [] } }} /> {/if} {#if copilotModule.description.length > 2 && copilotModule.source === undefined}
{#if copilotModule.hubCompletions.length > 0}

Hub scripts

    {#each copilotModule.hubCompletions as item (item.path)}
  • {/each}
{/if} {/if}
{/each} {#if flowCopilotMode !== 'trigger'}
{/if}