Skip to content

The open alternative to Salesforce, designed for AI.

288 B
Raw Blame
import { joinVariablePath } from 'twenty-shared/workflow';

export const getVariableTemplateFromPath = ({
  stepId,
  path,
}: {
  stepId: string;
  path: string[];
}) => {
  if (path.length === 0) {
    return `{{${stepId}}}`;
  }

  return `{{${stepId}.${joinVariablePath(path)}}}`;
};