So seems like the problem is with the line:
<li><a href="#"><img src="',variables('product_photo'),'"></a></li>that I want to dynamically take the photo from my onedrive folder (initialize variable action)
The error that appears in the stage of the conversion to pdf is because of that line.
What should I do differently to make the conversion work without compromising with a non-dynamic photo?
I tried changing the create file step to this:

so instead of having the line:
<li><a href="#"><img src="',variables('product_photo'),'"></a></li>inside the concat expression I place it outside of it with the variable. This works almost perfectly because then there is no error with the conversion and the pdf file is made but the picture appears like a text

dynamic photo is the highlighted text bellow (pdf version)
