Skip to content

Commit 0c69f8b

Browse files
committed
fix trigger input format version
1 parent 57e6203 commit 0c69f8b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

apps/sim/executor/utils/start-block.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,14 @@ function buildManualTriggerOutput(
378378
return mergeFilesIntoOutput(output, workflowInput)
379379
}
380380

381-
function buildIntegrationTriggerOutput(workflowInput: unknown): NormalizedBlockOutput {
381+
function buildIntegrationTriggerOutput(
382+
workflowInput: unknown,
383+
structuredInput: Record<string, unknown>,
384+
hasStructured: boolean
385+
): NormalizedBlockOutput {
386+
if (hasStructured) {
387+
return { ...structuredInput }
388+
}
382389
return isPlainObject(workflowInput) ? (workflowInput as NormalizedBlockOutput) : {}
383390
}
384391

@@ -428,7 +435,7 @@ export function buildStartBlockOutput(options: StartBlockOutputOptions): Normali
428435
return buildManualTriggerOutput(finalInput, workflowInput)
429436

430437
case StartBlockPath.EXTERNAL_TRIGGER:
431-
return buildIntegrationTriggerOutput(workflowInput)
438+
return buildIntegrationTriggerOutput(workflowInput, structuredInput, hasStructured)
432439

433440
case StartBlockPath.LEGACY_STARTER:
434441
return buildLegacyStarterOutput(

0 commit comments

Comments
 (0)