Resolved :
I have first get the external template, then insert the variables and create a copy with the variables.
Finally, insert the new template with the variables in my docx
$externalDocx = new CreateDocxFromTemplate(public_path() . '/templates/external file.docx');
$externalVariables = array(
'TIMEESTIMATED' => $request->get('DescriptionSheet')['timeEstimated'],
'HOURLYRATE' => $request->get('PriceInfo')['hourPrice'],
'TOTALCOST' => $request->get('PriceInfo')['totalCoast'],
'DISCOUNT' => $request->get('PriceInfo')['reductionAmount'],
'HOURLYRATEDISCOUNT' => $request->get('PriceInfo')['hourlyRateDiscounted']
);
$externalDocx->replaceVariableByText($externalVariables );
$externalDocx->createDocx(public_path() . '/templates/external file edit.docx');
$docx->replaceVariableByExternalFile(array('EXTERNALFILE' => public_path() . '/templates/external file edit.docx'), array('matchSource' => true));