diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdownFieldItems.tsx b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdownFieldItems.tsx
index 23397bfd1..fe4947fdb 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdownFieldItems.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdownFieldItems.tsx
@@ -115,7 +115,20 @@ export const WorkflowVariablesDropdownFieldItems = ({
}
};
- const headerLabel = currentPath.length === 0 ? step.name : currentPath.at(-1);
+ const getHeaderLabel = () => {
+ if (currentPath.length === 0) {
+ return step.name;
+ }
+
+ const subStepName = currentPath.at(-1);
+
+ if (isDefined(subStepName) && isRecordOutputSchema(step.outputSchema)) {
+ return step.outputSchema.fields[subStepName].label;
+ }
+
+ return subStepName;
+ };
+
const displayedObject = getDisplayedSubStepFields();
const options = displayedObject ? Object.entries(displayedObject) : [];
@@ -134,7 +147,7 @@ export const WorkflowVariablesDropdownFieldItems = ({
onClick={goBack}
style={{ position: 'fixed' }}
>
-
+