diff --git a/apps/sim/executor/utils/start-block.ts b/apps/sim/executor/utils/start-block.ts index 4fc5b7b7a..3b7982f93 100644 --- a/apps/sim/executor/utils/start-block.ts +++ b/apps/sim/executor/utils/start-block.ts @@ -383,10 +383,25 @@ function buildIntegrationTriggerOutput( structuredInput: Record, hasStructured: boolean ): NormalizedBlockOutput { + const output: NormalizedBlockOutput = {} + if (hasStructured) { - return { ...structuredInput } + for (const [key, value] of Object.entries(structuredInput)) { + output[key] = value + } } - return isPlainObject(workflowInput) ? (workflowInput as NormalizedBlockOutput) : {} + + if (isPlainObject(workflowInput)) { + for (const [key, value] of Object.entries(workflowInput)) { + if (value !== undefined && value !== null) { + output[key] = value + } else if (!Object.hasOwn(output, key)) { + output[key] = value + } + } + } + + return mergeFilesIntoOutput(output, workflowInput) } function extractSubBlocks(block: SerializedBlock): Record | undefined {