diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionUpsertRecord.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionUpsertRecord.tsx index be75b23406..7b1d749aa9 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionUpsertRecord.tsx +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionUpsertRecord.tsx @@ -268,7 +268,7 @@ export const WorkflowEditActionUpsertRecord = ({ { handleFieldChange('id', recordId); }} diff --git a/packages/twenty-server/src/modules/workflow/workflow-executor/workflow-actions/tool-executor-workflow-action.ts b/packages/twenty-server/src/modules/workflow/workflow-executor/workflow-actions/tool-executor-workflow-action.ts index 6b7971ecad..c16e916753 100644 --- a/packages/twenty-server/src/modules/workflow/workflow-executor/workflow-actions/tool-executor-workflow-action.ts +++ b/packages/twenty-server/src/modules/workflow/workflow-executor/workflow-actions/tool-executor-workflow-action.ts @@ -53,10 +53,7 @@ export class ToolExecutorWorkflowAction implements WorkflowAction { if (sendEmailInput.body) { toolInput = { ...sendEmailInput, - body: resolveRichTextVariables( - sendEmailInput.body, - context, - ), + body: resolveRichTextVariables(sendEmailInput.body, context), }; } } diff --git a/packages/twenty-shared/src/utils/rich-text-variable-resolver.ts b/packages/twenty-shared/src/utils/rich-text-variable-resolver.ts index 40f80fcf9d..1223ab2ed3 100644 --- a/packages/twenty-shared/src/utils/rich-text-variable-resolver.ts +++ b/packages/twenty-shared/src/utils/rich-text-variable-resolver.ts @@ -31,9 +31,9 @@ const buildTextNodesWithLineBreaks = (text: string): string => { export const resolveRichTextVariables = ( input: string | null | undefined, context: Record, -): string | null | undefined => { +): string | undefined => { if (!isDefined(input)) { - return input; + return undefined; } return input.replace(